Hello everyone, I need help, what happens is that I want to put a time limit on the admin so I do not abuse using the admin menu in my zombie plague 1.6.1 what I want is for the admin when he goes to:
Give:
zombie / human
nemesis
survivor
sniper
assessment
to revive
start mod:
swarm
armaggedon
multiple-infection
assessin vs sniper
plague mode
Once you have used the admin menu, you have to wait a certain time to reuse it, I would like it to be 200 seconds. help me, please.
thank you very much bro, this work perfecty, but if I leave the admin menu open and I do not close it, the admin can use the commands as many times as he wants and abuse, how could limit the other menus:
9: admin menu (this have limit)
1: give class or respawn (no have limit)
-give zombie/human
-give survivor
-give nemesis
etc, etc
the admin can use them segidamente and I want that also it has the limits
2: start a mod (no have limit)
-swarm
-plague
etc etc
the admin can use them segidamente and I want that also it has the limits
3: costom modes (no have limit)
-assasin vs sniper
the admin can use them segidamente and I want that also it has the limits
thank you very much bro, this work perfecty, but if I leave the admin menu open and I do not close it, the admin can use the commands as many times as he wants and abuse, how could limit the other menus:
9: admin menu (this have limit)
1: give class or respawn (no have limit)
-give zombie/human
-give survivor
-give nemesis
etc, etc
the admin can use them segidamente and I want that also it has the limits
2: start a mod (no have limit)
-swarm
-plague
etc etc
the admin can use them segidamente and I want that also it has the limits
3: costom modes (no have limit)
-assasin vs sniper
the admin can use them segidamente and I want that also it has the limits
how limit this menus? pls help me
the same way just scroll down a little in your code where you added this limit and do the same with the rest
thank you very much bro, this work perfecty, but if I leave the admin menu open and I do not close it, the admin can use the commands as many times as he wants and abuse, how could limit the other menus:
9: admin menu (this have limit)
1: give class or respawn (no have limit)
-give zombie/human
-give survivor
-give nemesis
etc, etc
the admin can use them segidamente and I want that also it has the limits
2: start a mod (no have limit)
-swarm
-plague
etc etc
the admin can use them segidamente and I want that also it has the limits
3: costom modes (no have limit)
-assasin vs sniper
the admin can use them segidamente and I want that also it has the limits
how limit this menus? pls help me
the same way just scroll down a little in your code where you added this limit and do the same with the rest
// Admin Menu public menu_admin(id, key) { static userflags userflags = get_user_flags(id)
switch (key) { case ACTION_ZOMBIEFY_HUMANIZE: // Zombiefy/Humanize command { if (userflags & (g_access_flag[ACCESS_MODE_INFECTION] | g_access_flag[ACCESS_MAKE_ZOMBIE] | g_access_flag[ACCESS_MAKE_HUMAN])) { // Show player list for admin to pick a target PL_ACTION = ACTION_ZOMBIEFY_HUMANIZE show_menu_player_list(id) } else { zp_colored_print(id, "^x04[ZP]^x01 %L", id, "CMD_NOT_ACCESS") show_menu_admin(id) } }
i change to ----->
// Admin Menu public menu_admin(id, key) { static userflags userflags = get_user_flags(id)
switch (key) { case ACTION_ZOMBIEFY_HUMANIZE: // Zombiefy/Humanize command { if (userflags & (g_access_flag[ACCESS_MODE_INFECTION] | g_access_flag[ACCESS_MAKE_ZOMBIE] | g_access_flag[ACCESS_MAKE_HUMAN])) { // Show player list for admin to pick a target PL_ACTION = ACTION_ZOMBIEFY_HUMANIZE show_menu_player_list(id) { if(g_iAdMenuUsage[id] >= ADMINMENUUSAGE_LIMIT) { zp_colored_print(id, "^x04[ZP]^x01 You have reached admin menu limit usage!") zp_colored_print(id, "^x04[ZP]^x01 Admin menu limit per map is %d!", ADMINMENUUSAGE_LIMIT) } else { show_menu_admin(id)
thank you very much bro, this work perfecty, but if I leave the admin menu open and I do not close it, the admin can use the commands as many times as he wants and abuse, how could limit the other menus:
9: admin menu (this have limit)
1: give class or respawn (no have limit)
-give zombie/human
-give survivor
-give nemesis
etc, etc
the admin can use them segidamente and I want that also it has the limits
2: start a mod (no have limit)
-swarm
-plague
etc etc
the admin can use them segidamente and I want that also it has the limits
3: costom modes (no have limit)
-assasin vs sniper
the admin can use them segidamente and I want that also it has the limits
how limit this menus? pls help me
the same way just scroll down a little in your code where you added this limit and do the same with the rest
no no work >_<
Last Edit: Dec 30, 2018 2:34:45 GMT by arsenio: no work
please help me for complety this.. i try in this menu and no work, please how add the limit here:
// Admin Menu public menu_admin(id, key) { static userflags userflags = get_user_flags(id)
switch (key) { case ACTION_ZOMBIEFY_HUMANIZE: // Zombiefy/Humanize command { if (userflags & (g_access_flag[ACCESS_MODE_INFECTION] | g_access_flag[ACCESS_MAKE_ZOMBIE] | g_access_flag[ACCESS_MAKE_HUMAN])) { // Show player list for admin to pick a target PL_ACTION = ACTION_ZOMBIEFY_HUMANIZE show_menu_player_list(id) } else { zp_colored_print(id, "^x04[ZP]^x01 %L", id, "CMD_NOT_ACCESS") show_menu_admin(id) } } case ACTION_MAKE_NEMESIS: // Nemesis command { if (userflags & (g_access_flag[ACCESS_MODE_NEMESIS] | g_access_flag[ACCESS_MAKE_NEMESIS])) { // Show player list for admin to pick a target PL_ACTION = ACTION_MAKE_NEMESIS show_menu_player_list(id) } else { zp_colored_print(id, "^x04[ZP]^x01 %L", id, "CMD_NOT_ACCESS") show_menu_admin(id) } } case ACTION_MAKE_SURVIVOR: // Survivor command { if (userflags & (g_access_flag[ACCESS_MODE_SURVIVOR] | g_access_flag[ACCESS_MAKE_SURVIVOR])) { // Show player list for admin to pick a target PL_ACTION = ACTION_MAKE_SURVIVOR show_menu_player_list(id) } else { zp_colored_print(id, "^x04[ZP]^x01 %L", id, "CMD_NOT_ACCESS") show_menu_admin(id) } } case ACTION_MAKE_SNIPER: // Sniper command { if (userflags & (g_access_flag[ACCESS_MODE_SNIPER] | g_access_flag[ACCESS_MAKE_SNIPER])) { // Show player list for admin to pick a target PL_ACTION = ACTION_MAKE_SNIPER show_menu_player_list(id) } else { zp_colored_print(id, "^x04[ZP]^x01 %L", id, "CMD_NOT_ACCESS") show_menu_admin(id) } } case ACTION_MAKE_ASSASSIN: // Assassin command { if (userflags & (g_access_flag[ACCESS_MODE_ASSASSIN] | g_access_flag[ACCESS_MAKE_ASSASSIN])) { // Show player list for admin to pick a target PL_ACTION = ACTION_MAKE_ASSASSIN show_menu_player_list(id) } else { zp_colored_print(id, "^x04[ZP]^x01 %L", id, "CMD_NOT_ACCESS") show_menu_admin(id) } } case ACTION_RESPAWN_PLAYER: // Respawn command { if (userflags & g_access_flag[ACCESS_RESPAWN_PLAYERS]) { // Show player list for admin to pick a target PL_ACTION = ACTION_RESPAWN_PLAYER show_menu_player_list(id) } else { zp_colored_print(id, "^x04[ZP]^x01 %L", id, "CMD_NOT_ACCESS") show_menu_admin(id) } } case 9: // Chose to return { show_menu3_admin(id) } } return PLUGIN_HANDLED; }
i have limit in:
admin menu (have limit)
1) add class or respawn a player (have limit) 2) start a mode (have limit) 3) costom modes (have limit)
but the admin if dont closed the menu 1) add class or respawn player, can give class zm , human, survifor, etc.. much times. i want the limit here but no work.. error error and error :/ i try all, please help.