Open menu only once per round
Hello!
Sorry my bad English. I wanted to know the code for the player to use the menu soh once per round. Quote:
|
Re: Open menu only once per round
Create a boolean variable and set it to false when the player is spawned. When the player opens the menu set it to true. Only allow the player to open the menu if the boolean is false.
PHP Code:
|
Re: Open menu only once per round
Quote:
|
Re: Open menu only once per round
Quote:
|
Re: Open menu only once per round
So I tried to add this when opening the zombie menu but I couldn't, can you help me?
============================================= =================== public select_class_zombie(id, menu, item) { if (!g_zombie[id]) return PLUGIN_HANDLED if (item == MENU_EXIT) { menu_destroy(menu) give_zombiebom(id) return PLUGIN_HANDLED } new idclass[32], name[32], access menu_item_getinfo(menu, item, access, idclass, 31, name, 31, access) // set class zombie g_zombieclass[id] = str_to_num(idclass) make_zombie(id) give_zombiebom(id) menu_destroy(menu) //client_print(id, print_chat, "item: %i - id: %s", name, idclass) return PLUGIN_HANDLED } ============================================= =================== |
Re: Open menu only once per round
Show your full code, and put your code between php tags. [ php ] [/ php ] (without spaces)
|
Re: Open menu only once per round
Quote:
Code:
#include <amxmisc> NOTE: you can use like menu_limit[id]++ , menu_limit[id] += 1 if you want more limits and just make check if == 2 then return or == 3 then return |
All times are GMT -4. The time now is 03:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.