Raised This Month: $51 Target: $400
 12% 

Help me with this menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
MITAR
Junior Member
Join Date: Sep 2018
Old 11-10-2018 , 22:31   Help me with this menu
Reply With Quote #1

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

}
MITAR is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode