Hey, could someone please make this plugin so that i can only use the command once per round.
i think its something to do with
bool:AlreadyUsed[33] but i dont know how to make it work. if someone could help me i would be happy
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>
#include <fun>
#include <colorchat>
#define ADMIN_VIP ADMIN_LEVEL_H
new g_iMenuId;
public plugin_init()
{
register_plugin("Vipmenu", "1.0", "Ranel");
register_clcmd("say /vipmenu", "VMENU");
g_iMenuId = menu_create("\yVipmenu", "HandleMenu");
menu_additem(g_iMenuId, "HE", "1");
menu_additem(g_iMenuId, "FBx2", "2");
menu_additem(g_iMenuId, "FN", "3");
menu_additem(g_iMenuId, "USP(2bullets)", "4");
}
public VMENU(id)
{
if(is_user_alive(id) && access(id, ADMIN_VIP) || access(id, ADMIN_MENU))
menu_display(id, g_iMenuId);
}
public HandleMenu(id, iMenuId, iItem)
{
if(iItem == MENU_EXIT || !is_user_alive(id))
return PLUGIN_HANDLED;
}
switch(iItem)
{
case 0:
{
give_item(id, "weapon_hegrenade");
ColorChat(id, NORMAL, "^x04[^x03Vipmenu^x04]^x01 You choosed HeGrenade");
}
case 1:
{
give_item(id, "weapon_flashbang");
give_item(id, "weapon_flashbang");
ColorChat(id, NORMAL, "^x04[^x03Vipmenu^x04]^x01 You choosed 2 FlashBangs");
}
case 2:
{
give_item(id, "weapon_smokegrenade");
ColorChat(id, NORMAL, "^x04[^x03Vipmenu^x04]^x01 You choosed FrostNade");
}
case 3:
{
new iWeapon = give_item( id, "weapon_usp" )
cs_set_weapon_ammo( iWeapon, 2 )
ColorChat(id, NORMAL, "^x04[^x03Vipmenu^x04]^x01 You choosed USP with 2 bullets");
}
}
return PLUGIN_HANDLED;
}