Raised This Month: $ Target: $400
 0% 

Weapon script


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 06-25-2010 , 02:31   Re: Weapon script
Reply With Quote #1

Code:
if( !( get_user_flags( id ) & ADMIN_LEVEL_A ) ) {     return; }
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 06-25-2010 , 03:01   Re: Weapon script
Reply With Quote #2

Where i need to type it|?
PHP Code:
#include <amxmodx>
#include <fun>

public plugin_init()
{
    
register_clcmd"say /vipmenu""VIPMenu" );
    
register_clcmd"say_team /vipmenu""VIPMenu" );
}

public 
VIPMenuid )
{
    new 
vip_menu menu_create"\rVip meniu:""menu_handler" );
    
menu_additemvip_menu"\w+55 hp +200Armour""1");
    
menu_additemvip_menu"\wMachine gun""2");
    
menu_additemvip_menu"\wGravity""3");
    
    
menu_setpropvip_menuMPROP_EXITMEXIT_ALL );
    
menu_displayidvip_menu);
}

public 
menu_handleridmenuitem )
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroymenu );
        return 
PLUGIN_HANDLED;
    }
    new 
data[6], iName[64];
    new 
accesscallback;
    
    
menu_item_getinfomenuitemaccessdata,5iName63callback );
    new 
key str_to_numdata );
    switch( 
key )
    {
        case 
1:
        {
            if( 
is_user_aliveid ) )
            {
                
set_user_healthid165 ); //Sets health of id to 150
                
set_user_armorid200 ); //Sets armor of id to 200
        
client_print(idprint_chat"\bTavo givybes buvo pripildytos iki 150 ir gavai 200 sarvu.");
            }
        }
        case 
2:
        {
            if( 
is_user_aliveid ) )
            {
                
give_itemid"weapon_m249" ); //Gives id a machine gun
                
give_itemid"ammo_556natobox" ); //Gives id machine gun ammo
        
client_print(idprint_chat"\gTu gavai machinegun'a!");
            }
        }
        case 
3:
        {
            if( 
is_user_aliveid ) )
            {
           
set_user_gravity(id0.68)
           
client_print(idprint_chat"\rTavo gravitacija sumazinta, dabar tu supermenas :)");
            }
        }
    }
    
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;
}  
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/ 
zirualas is offline
Send a message via Skype™ to zirualas
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 06-25-2010 , 04:02   Re: Weapon script
Reply With Quote #3

Quote:
Originally Posted by zirualas View Post
Where i need to type it?
Try this

PHP Code:
public VIPMenuid )
{
    if( 
get_user_flagsid ) & ADMIN_MENU )
    {
        new 
vip_menu menu_create"\rVip meniu:""menu_handler" );
        
menu_additemvip_menu"\w+55 hp +200Armour""1");
        
menu_additemvip_menu"\wMachine gun""2");
        
menu_additemvip_menu"\wGravity""3");
        
        
menu_setpropvip_menuMPROP_EXITMEXIT_ALL );
        
menu_displayidvip_menu);
    }

__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.

Last edited by GXLZPGX; 06-25-2010 at 05:03.
GXLZPGX is offline
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 06-25-2010 , 04:11   Re: Weapon script
Reply With Quote #4

Again, question
I can type and type /vipmenu.
How i can do when i type /vipmenu select item and him disapear and when i type /vipmenu show "You have vipmenu privilege, try next round".

---Edited---

Wha's was happened.
[IMG]http://img696.**************/img696/3919/amadre.th.jpg[/IMG]

Last edited by zirualas; 06-25-2010 at 04:29.
zirualas is offline
Send a message via Skype™ to zirualas
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 06-25-2010 , 05:03   Re: Weapon script
Reply With Quote #5

Quote:
Originally Posted by zirualas View Post
Again, question
I can type and type /vipmenu.
How i can do when i type /vipmenu select item and him disapear and when i type /vipmenu show "You have vipmenu privilege, try next round".

---Edited---

Wha's was happened.
[IMG]http://img696.**************/img696/3919/amadre.th.jpg[/IMG]
Try this:

PHP Code:
ublic VIPMenuid 

    if( 
get_user_flagsid ) & ADMIN_MENU 
    { 
        new 
vip_menu menu_create"\rVip meniu:""menu_handler" ); 
        
menu_additemvip_menu"\w+55 hp +200Armour""1"); 
        
menu_additemvip_menu"\wMachine gun""2"); 
        
menu_additemvip_menu"\wGravity""3"); 
         
        
menu_setpropvip_menuMPROP_EXITMEXIT_ALL ); 
        
menu_displayidvip_menu); 
    }
    else
    {
        
client_printid"You don't have access to this menu!" )
    }

__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 06-25-2010 , 05:45   Re: Weapon script
Reply With Quote #6

I need use /vipmenu peoples who have flag J.
I find bug. I type /vipmenu and i select +55 hp and +200 armour. I get +55 hp and +200 armours but i write again /vipmenu and i select machinegun. I get it but my +55 hp and +200 armours dpn't disapear.
zirualas is offline
Send a message via Skype™ to zirualas
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 14:51.


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