Kod:
public npcMenu(id)
{
new name[33], text[512];
get_user_name(id, name, 32);
format(text, 511, "%L", id, "NU_MENU", name);
show_menu(id, menuKeys, text, -1, "npcMenu");
return FMRES_HANDLED;
}
public npcMenuEnter(id, key)
{
new name[33];
get_user_name(id, name, 32);
switch(key)
{
case 0:
{
inMenu[id] = false;
show_motd(id, "pomocmod.txt", "Info o Mod")
return PLUGIN_HANDLED;
}
case 1:
{
// Key 2
inMenu[id] = false;
client_print(id, print_chat, "%L", id, "NU_HISTORIA", name );
npcMenuHistoria(id);
return PLUGIN_HANDLED;
}
case 2:
{
// Key 3
inMenu[id] = false;
client_print(id, print_chat, "%L", id, "NU_SKLEP", name );
return PLUGIN_HANDLED;
}
case 3:
{
// Key 4
inMenu[id] = false;
client_print(id, print_chat, "%L", id, "NU_MISJA", name );
return PLUGIN_HANDLED;
}
case 7:
{
// Key 8
inMenu[id] = false;
npcMenuAdmin(id);
client_print(id, print_chat, "%L", id, "NU_GOMENUADMIN", name );
return PLUGIN_HANDLED;
}
case 8:
{
// Key 9
inMenu[id] = false;
client_print(id, print_chat, "%L", id, "NU_EXIT", name );
return PLUGIN_HANDLED;
}
}
return PLUGIN_HANDLED;
}
public npcMenuHistoria(id)
{
new name[33], text[512];
get_user_name(id, name, 32);
format(text, 511, "%L", id, "NU_MENUHISTORIA", name);
show_menu(id, menuKeys, text, -1, "npcMenuHistoria");
return FMRES_HANDLED;
}
public npcMenuEnterHistoria(id, key)
{
switch(key)
{
case 0:
{
inMenu[id] = false;
show_motd(id, "naruto_uzumaki.txt", "Info o Naruto")
return PLUGIN_HANDLED;
}
case 1:
{
// Key 2
inMenu[id] = false;
show_motd(id, "itachi_uchiha.txt", "Info o Itachi")
return PLUGIN_HANDLED;
}
case 2:
{
// Key 3
inMenu[id] = false;
show_motd(id, "sakura_haruno.txt", "Info o Sakura")
return PLUGIN_HANDLED;
}
case 3:
{
// Key 4
inMenu[id] = false;
show_motd(id, "sasuke_uchiha.txt", "Info o Sasuke")
return PLUGIN_HANDLED;
}
case 4:
{
// Key 5
inMenu[id] = false;
show_motd(id, "rock_lee.txt", "Info o Lee")
return PLUGIN_HANDLED;
}
case 5:
{
// Key 6
inMenu[id] = false;
show_motd(id, "tenten.txt", "Info o Tenten")
return PLUGIN_HANDLED;
}
case 8:
{
// Key 9
inMenu[id] = false;
client_print(id, print_chat, "%L", id, "NU_EXITHISTORIA");
return PLUGIN_HANDLED;
}
}
return PLUGIN_HANDLED;
}
public npcMenuAdmin(id)
{
new name[33], text[512];
get_user_name(id, name, 32);
format(text, 511, "%L", id, "NU_MENUADMIN", name);
show_menu(id, menuKeys, text, -1, "npcMenuAdmin");
return PLUGIN_HANDLED;
}
public npcTakAdmin(id, key)
{
new name[33];
get_user_name(id, name, 32);
switch(key)
{
case 0:
{
inMenu[id] = false;
show_motd(id, "admininfo.txt", "Info o Adminie")
return PLUGIN_HANDLED;
}
case 1:
{
// Key 2
inMenu[id] = false;
client_print(id, print_chat, "%L", id, "NU_NEWNPC", name );
createNPC(id);
return PLUGIN_HANDLED;
}
case 2:
{
// Key 3
inMenu[id] = false;
client_print(id, print_chat, "%L", id, "NU_SAYADMIN", name );
set_hudmessage(0, 255, 0, 0.13, 0.26, 0, 6.0, 12.0)
show_hudmessage(id, "Just-Street.PL i zycje staje sie lepsze... ")
client_cmd(id, "say @@ Zapraszamy na Just-Street.PL")
return PLUGIN_HANDLED;
}
/*case 3:
{
// Key 4
inMenu[id] = false;
client_print(id, print_chat, "%L", id, "NU_MISJA", name );
//misja(id);
}
case 7:
{
// Key 8
inMenu[id] = false;
client_print(id, print_chat, "%L", id, "NU_MENUADMIN", name );
//misja(id);
}
case 8:
{
// Key 9
inMenu[id] = false;
client_print(id, print_chat, "%L", id, "NU_EXIT", name );
}
*/
}
return PLUGIN_HANDLED;
}
Dodano 07 maj 2011 - 07:05:
Proszę o zamknięcie, Stare menu zastąpiłem tym nowszym.