Salut am un plugin vip classic care ofera in meniu 1.ak47+deagle , viata, armura sau m4a1+deagle
Problema e ca poti folosi /vipmenu pe runda de n ori .. as vrea sa fie limitat doar odata pe runda
va las mai jos sma
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < engine >
#include < hamsandwich >
#define PLUGIN "Meniu de VIP"
#define VERSION "1.0"
#define AUTHOR "cRi"
new cvar_pluginon;
public plugin_init()
{
register_plugin( PLUGIN, VERSION, AUTHOR );
cvar_pluginon = register_cvar ( "amx_vipmenu", "1" )
register_clcmd("say /vipmenu","vip_menu", ADMIN_CVAR )
register_clcmd("say /vreauvip", "vreau_vip")
}
public vreau_vip(id)
{
show_motd(id,"addons/amxmodx/configs/vip.txt","VreauVip")
}
public vip_menu ( id, level, cid )
{
if(!cmd_access(id,level,cid,1))
return PLUGIN_HANDLED
if ( !get_pcvar_num ( cvar_pluginon ) )
return PLUGIN_HANDLED
if (is_user_alive(id))
{
new menu = menu_create( "[STAR]Ce aduce sistemul VIP?:", "menu_handler" )
menu_additem(menu, "VIATA", "2", 0 )
menu_additem(menu, "ARMURA", "3", 0 )
menu_additem(menu, "M4A1+DEAGLE", "4", 0)
menu_additem(menu, "AK47+DEAGLE", "5", 0)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
}
return 1
}
public menu_handler ( id, menu, item )
{
if( item == MENU_EXIT )
{
return 1
}
new data[6], szName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
new key = str_to_num(data);
switch(key)
{
case 1:
{
set_user_gravity(id,0.7)
}
case 2:
{
set_user_health(id, 150)
}
case 3:
{
set_user_armor(id, 150)
}
case 4:
{
give_item(id, "weapon_m4a1");
give_item(id, "weapon_deagle");
cs_set_user_bpammo(id, CSW_M4A1, 90);
cs_set_user_bpammo(id, CSW_DEAGLE, 35);
}
case 5:
{
give_item(id, "weapon_ak47");
give_item(id, "weapon_deagle");
cs_set_user_bpammo(id, CSW_AK47, 90);
cs_set_user_bpammo(id, CSW_DEAGLE, 35);
}
}
menu_destroy(menu);
return 1
}
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < engine >
#include < hamsandwich >
#define PLUGIN "Meniu de VIP"
#define VERSION "1.0"
#define AUTHOR "cRi"
new cvar_pluginon;
public plugin_init()
{
register_plugin( PLUGIN, VERSION, AUTHOR );
cvar_pluginon = register_cvar ( "amx_vipmenu", "1" )
register_clcmd("say /vipmenu","vip_menu", ADMIN_CVAR )
register_clcmd("say /vreauvip", "vreau_vip")
}
public vreau_vip(id)
{
show_motd(id,"addons/amxmodx/configs/vip.txt","VreauVip")
}
public vip_menu ( id, level, cid )
{
if(!cmd_access(id,level,cid,1))
return PLUGIN_HANDLED
if ( !get_pcvar_num ( cvar_pluginon ) )
return PLUGIN_HANDLED
if (is_user_alive(id))
{
new menu = menu_create( "[STAR]Ce aduce sistemul VIP?:", "menu_handler" )
menu_additem(menu, "VIATA", "2", 0 )
menu_additem(menu, "ARMURA", "3", 0 )
menu_additem(menu, "M4A1+DEAGLE", "4", 0)
menu_additem(menu, "AK47+DEAGLE", "5", 0)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
}
return 1
}
public menu_handler ( id, menu, item )
{
if( item == MENU_EXIT )
{
return 1
}
new data[6], szName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
new key = str_to_num(data);
switch(key)
{
case 1:
{
set_user_gravity(id,0.7)
}
case 2:
{
set_user_health(id, 150)
}
case 3:
{
set_user_armor(id, 150)
}
case 4:
{
give_item(id, "weapon_m4a1");
give_item(id, "weapon_deagle");
cs_set_user_bpammo(id, CSW_M4A1, 90);
cs_set_user_bpammo(id, CSW_DEAGLE, 35);
}
case 5:
{
give_item(id, "weapon_ak47");
give_item(id, "weapon_deagle");
cs_set_user_bpammo(id, CSW_AK47, 90);
cs_set_user_bpammo(id, CSW_DEAGLE, 35);
}
}
menu_destroy(menu);
return 1
}