Jump to content

- Advertisement -
Photo

Plugin vip modificare


  • This topic is locked This topic is locked
3 replies to this topic

#1
skb12

skb12

    New Member

  • New Member
  • 1 posts
  • 1 topics
  • Joined 11-September 15
  • Country: Country Flag

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



}
 

 

 



#2
sinnoptic

sinnoptic

    Advanced Member

  • Membru
  • 164 posts
  • 44 topics
  • Joined 12-April 14
  • Country: Country Flag

Revin cu edit, ti-l rezolv eu .



#3
appLy^NxT

appLy^NxT

    Fost Resource Team

  • Retired
  • 1313 posts
  • 195 topics
  • Joined 20-November 12
  • Country: Country Flag
Spoiler


#4
sinnoptic

sinnoptic

    Advanced Member

  • Membru
  • 164 posts
  • 44 topics
  • Joined 12-April 14
  • Country: Country Flag

 

Spoiler

 

Se pare ca  mi-ai luat-o pe dinainte.

T.C


Edited by TheProfessional, 12 September 2015 - 09:35 PM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users