Raised This Month: $ Target: $400
 0% 

Putting together a plugin? (VIPMenu)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
SozzZod
Junior Member
Join Date: Oct 2009
Old 07-24-2010 , 14:54   Re: Putting together a plugin? (VIPMenu)
Reply With Quote #9

If So, then i will show you the full plugin atm... all i need is speed command and the interval between using the vipmenu (120sec thingy i talked about)...
Oh and the falldamage thingy too.


PHP Code:
#include <amxmodx>
#include <fun>
new vip_menu

}

public 
plugin_init()
{
 
register_clcmd"say /vipmenu","VIPMenu");
}
public 
VIPMenu(id)
{
if( !( 
get_user_flagsid ) & ADMIN_LEVEL_B ) ) {
     return;
 
vip_menu menu_create("\rVip menu:""menu_handler");
 
menu_additem(vip_menu"\wHealth And Armor""1"0);
 
menu_additem(vip_menu"\wGive Deagle""2"0);
 
menu_additem(vip_menu"\wGrenades""3"0); //is it right?
 
menu_setprop(vip_menuMPROP_EXITMEXIT_ALL);
}

public 
menu_handler(idmenuitem)
{
 if( 
item == MENU_EXIT )
 {
  
menu_destroy(menu);
  return 
PLUGIN_HANDLED;
 }
 new 
data[6], iName[64];
 new 
accesscallback;
 
 
menu_item_getinfo(menuitemaccessdata,5iName63callback);
 new 
key str_to_num(data);
 switch(
key)
 {
  case 
1:
  {
   
set_user_health(id150); //Sets health of id to 150
   
set_user_armor(id200); //Sets armor of id to 200
  
}
 
  case 
2:
  {
   
give_item(id"weapon_deagle");
   
give_item(id"ammo_50ae"); // How can i change it, so it gives only 1 bullet?
  
}
  case 
3:
 {
   
give_item(id"weapon_flashbang") ;
   
give_item(id"weapon_flashbang") ;
   
give_item(id"weapon_smokegrenade") ;
   
give_item(id"weapon_hegrenade") ;       //I tried to make it myself.
  
}  
  case 
4:
  {
  } 
 }
 
menu_destroy(menu);
 return 
PLUGIN_HANDLED;

SozzZod 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 00:09.


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