Siemka .!
Zrobiłem frakcje do diablo moda, działają ładnie tylko nie da się wybrać klasy ![]()
Proszę kod frakcji:
public select_class(id)
{
if(is_user_bot(id)) return PLUGIN_HANDLED;
asked_klass[id] = 0
new MyMenu=menu_create("\dDiablo Mod edit by: \rxxxxWWWxxxx^n\yWybierz Klase:","select_class_menu");
menu_additem(MyMenu,"\wKlasy Podstawowe \d[Klasy Za Darmo");
menu_additem(MyMenu,"\dKlasy Premium \d[Klasy Platne]");
menu_display(id, MyMenu,0);
return PLUGIN_HANDLED;
}
public select_class_menu(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
switch(item)
{
case 0: select_class_zwykle(id)
case 1: select_class_premium(id)
}
return PLUGIN_HANDLED;
}
public select_clas_handle(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
switch(item)
{
case 0:
{
select_class_zwykle(id)
}
case 1:
{
select_class_premium(id)
}
}
return PLUGIN_HANDLED;
}
public select_class_zwykle(id)
{
new text1[512]
format(text1, 511,"\yWybierz:^n\r1. \wMag Lev :%i^n\r2. \wMnich Lev :%i^n\r3. \wPaladyn Lev :%i^n\r4. \wZabojca Lev :%i^n\r5. \wNekromanta Lev :%i^n\r6. \wBarbarzynca Lev :%i^n\r7. \wNinja Lev :%i^n\r8. \wLowca Lev :%i^n^n0.\yWroc^n^n",
player_class_lvl[id][1],player_class_lvl[id][2],player_class_lvl[id][3],
player_class_lvl[id][4],player_class_lvl[id][5],player_class_lvl[id][6],player_class_lvl[id][7],player_class_lvl[id][8])
show_menu(id, klawisze,text1, -1, "Zwykle")
}
public select_clas_zwykle_handle(id, key)
{
asked_klass[id] = 0;
switch (key)
{
case 0:
{
player_class[id] = Mag
}
case 1:
{
player_class[id] = Mnich
}
case 2:
{
player_class[id] = Paladyn
}
case 3:
{
player_class[id] = Zabojca
}
case 4:
{
player_class[id] = Nekromanta
g_haskit[id] = 1
}
case 5:
{
player_class[id] = Barbarzynca
}
case 6:
{
player_class[id] = Ninja
}
case 7:
{
player_class[id] = Hunter
g_GrenadeTrap[id] = 1
}
}
LoadXP(id, player_class[id])
CurWeapon(id)
give_knife(id)
return PLUGIN_HANDLED;
}
public select_class_premium(id)
{
new text1[512]
format(text1, 511,"\yWybierz:^n\r1. \wAndariel Lev :%i^n\r2. \wDiablo Lev :%i^n^n0.\yWroc^n^n",
player_class_lvl[id][9],player_class_lvl[id][10])
show_menu(id, klawisze,text1, -1, "Premium")
}
public select_clas_premium_handle(id, key)
{
asked_klass[id] = 0;
switch (key)
{
case 0:
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
player_class[id] = Diablo
LoadXP(id, player_class[id])
}
else
select_class(id);
}
case 1:
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
player_class[id] = Andariel
LoadXP(id, player_class[id])
}
else
select_class(id);
}
}
return PLUGIN_HANDLED;
}


Dodatki SourceMod






diablo.amxx







