Help me with this menu
hello can help me make this plugin work and only be open 1 once per round and add revive to the menu ie when selected the player who selected a respawn
the menu to be opened by the flag "t" Yes I tried this menu alone but without success #include <amxmodx> #include <amxmisc> #include <fakemeta> #include <cstrike> #include <fun> #pragma tabsize 0 #define ADMIN_VIP ADMIN_MENU new cvar_on new entlist[][] = { "func_button", "trigger_multiple", "trigger_once" } public plugin_init() { register_plugin("open jail","1.0","danielkza","MITAR"); register_concmd("open_jail","open_jail_cmd"); cvar_on = register_cvar("open_jail_on","1"); register_clcmd("say /vmenu", "HandleMenu"); } public open_jail_cmd(id,level,cid) { if(!cmd_access(id,level,cid,0)) return PLUGIN_HANDLED new map[32] get_mapname(map,31) if(!get_pcvar_num(cvar_on)) { client_print(id,print_console,"[HLEP] Jail opening disabled") return PLUGIN_HANDLED } else if(!equali(map,"surf",4)) { client_print(id,print_console,"[HELP] Not in a Surf map") return PLUGIN_HANDLED } else { if(read_argc()>1) { new arg[8] read_argv(1,arg,7) set_task(str_to_float(arg),"open_jail",id) } else open_jail(id) } return PLUGIN_HANDLED } new menu = menu_create("\yVMENU", "HandleMenu"); menu_additem(g_iMenuId, "M3 + Deagle + He + Armor", "1"); menu_additem(g_iMenuId, "M4a1 + Deagle + He + Armor", "2"); menu_additem(g_iMenuId, "Ak47 + Deagle + He + Armor", "3"); menu_additem(g_iMenuId, "AWP + Deagle + HE + Armor", "4"); public HandleMenu(id, iMenuId, iItem) { if(iItem == MENU_EXIT || !is_user_alive(id)) return PLUGIN_HANDLED; switch(iItem) { case 0: { give_item(id, "weapon_m3"); give_item(id, "weapon_deagle"); give_item(id, "weapon_hegrenade"); set_user_armor(id, 100); cs_set_user_bpammo(id, CSW_DEAGLE, 35); cs_set_user_bpammo(id, CSW_M3, 32); } case 1: { give_item(id, "weapon_m4a1"); give_item(id, "weapon_deagle"); give_item(id, "weapon_hegrenade"); set_user_armor(id, 100); cs_set_user_bpammo(id, CSW_DEAGLE, 35); cs_set_user_bpammo(id, CSW_M4A1, 90); } case 2: { give_item(id, "weapon_ak47"); give_item(id, "weapon_deagle"); give_item(id, "weapon_hegrenade"); set_user_armor(id, 100); cs_set_user_bpammo(id, CSW_DEAGLE, 35); cs_set_user_bpammo(id, CSW_M4A1, 90); } case 3: { give_item(id, "weapon_awp"); give_item(id, "weapon_deagle"); give_item(id, "weapon_hegrenade"); set_user_armor(id, 100); cs_set_user_bpammo(id, CSW_DEAGLE, 35); cs_set_user_bpammo(id, CSW_AWP, 30); } public open_jail(id) { new ent,target[32],ent2 for(new i=0;i < sizeof entlist;i++) { ent=0 ent2=0 while((ent = engfunc(EngFunc_FindEntityByString, ent, "classname", entlist[i]))) { if(pev_valid(ent)) { //dllfunc(DLLFunc_Touch,ent,id) pev(ent,pev_target,target,31) while((ent2 = engfunc(EngFunc_FindEntityByString, ent2, "targetname", target))) { dllfunc(DLLFunc_Use,ent2,id) client_print(id,print_console,"[HELP] A jail esta agora aberta") return PLUGIN_HANDLED } |
Re: Help me with this menu
paste the code in PHP or code tag
like this way PHP Code:
|
Re: Help me with this menu
Try This
PHP Code:
|
Re: Help me with this menu
Thank you for making this pluguin work but I needed the prison to be opened by the menu and that the respawn option be added to the menu without any bugs, the respawn option can only be used every 5 rounds so as not to get too abusive. I also liked that the menu had 1 knife with or without model, but when giving the knife hit the adversary dies or change the knife damage I do not ask you to do it only if you want
I apologize for not posting in php because I did not know how to do it. |
All times are GMT -4. The time now is 22:04. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.