show menu every 3 rounds
i know we cant pass id to global event . but how can i do this ?
new g_iAdMenuUsage[33] = 0 public plugin_init() { register_logevent( "Logevent_RoundStart", 2, "1=Round_Start" ); register_clcmd("say /adminmenu", "clcmd_adminmenu") } public Logevent_RoundStart(id) { g_iAdMenuUsage[id] ++ } public clcmd_adminmenu(id) { if(g_iAdMenuUsage[id] > 3) { show_menu(id) } } |
Re: show menu every 3 rounds
get_players()
|
Re: show menu every 3 rounds
PHP Code:
|
Re: show menu every 3 rounds
Don't loop through all player entities, use get_players() as bigdaddy424 suggested.
|
Re: show menu every 3 rounds
Quote:
|
Re: show menu every 3 rounds
Thanks . And how can i stop giving g_iAdMenuUsage[id] to players at 3 ? I mean how can i detect if a player has 3 g_iAdMenuUsage and stop giving them until they use the menu ?
|
Re: show menu every 3 rounds
Quote:
|
Re: show menu every 3 rounds
PHP Code:
|
| All times are GMT -4. The time now is 00:33. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.