Raised This Month: $ Target: $400
 0% 

Putting together a plugin? (VIPMenu)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SozzZod
Junior Member
Join Date: Oct 2009
Old 07-24-2010 , 14:38   Re: Putting together a plugin? (VIPMenu)
Reply With Quote #1

The admin flag B thingy?
SozzZod is offline
SozzZod
Junior Member
Join Date: Oct 2009
Old 07-24-2010 , 14:54   Re: Putting together a plugin? (VIPMenu)
Reply With Quote #2

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
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 07-24-2010 , 15:04   Re: Putting together a plugin? (VIPMenu)
Reply With Quote #3

I'm not sure if there's a set_user_falldamage, but you could use set usergravity to decrease falldamage. Make another menu option for it and then case 4 would be set_user_gravity(id, "600") or whatever number. But first take out case 4 and compile this plugin to see if it will work. Also to do the speed. New menu item again new case. New float:speed=get_user_maxspeed(id). Then set_user_maxspeed(id, speed). Hope this helps

Last edited by nikhilgupta345; 07-24-2010 at 15:22.
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
SozzZod
Junior Member
Join Date: Oct 2009
Old 07-24-2010 , 16:20   Re: Putting together a plugin? (VIPMenu)
Reply With Quote #4

Thank you VERY much! =)
SozzZod is offline
DaxProxy
Senior Member
Join Date: Sep 2007
Old 07-25-2010 , 12:56   Re: Putting together a plugin? (VIPMenu)
Reply With Quote #5

Quote:
Originally Posted by nikhilgupta345 View Post
I'm not sure if there's a set_user_falldamage, but you could use set usergravity to decrease falldamage. Make another menu option for it and then case 4 would be set_user_gravity(id, "600") or whatever number. But first take out case 4 and compile this plugin to see if it will work. Also to do the speed. New menu item again new case. New float:speed=get_user_maxspeed(id). Then set_user_maxspeed(id, speed). Hope this helps
There are plugins which block falldamage...you could look into their code and use their code.
__________________

Want ApolloRP for Counter-Strike? Show your support: http://forums.alliedmods.net/showthr...39#post1264739
DaxProxy is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-25-2010 , 14:15   Re: Putting together a plugin? (VIPMenu)
Reply With Quote #6

Quote:
Originally Posted by nikhilgupta345 View Post
I just checked the function wiki, and there is no function register_saycmd?
It's not in funcwiki because somebody made a custom function:

PHP Code:
stock register_saycmd(saycommand[], function[], flags = -1info[])
{
    static 
sTemp[64]
    
formatex(sTempsizeof sTemp 1"say /%s"saycommand)
    
register_clcmd(sTemp, function, flagsinfo)
    
formatex(sTempsizeof sTemp 1"say .%s"saycommand)
    
register_clcmd(sTemp, function, flagsinfo)
    
formatex(sTempsizeof sTemp 1"say_team /%s"saycommand)
    
register_clcmd(sTemp, function, flagsinfo)
    
formatex(sTempsizeof sTemp 1"say_team .%s"saycommand)
    
register_clcmd(sTemp, function, flagsinfo)

__________________
fysiks is offline
Reply



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