Raised This Month: $ Target: $400
 0% 

Weapon script


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 06-24-2010 , 11:48   Re: Weapon script
Reply With Quote #1

Quote:
Originally Posted by RedRobster View Post
Add a "h" to "healt". It should be "set_user_health".
__________________
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-24-2010 , 11:58   Re: Weapon script
Reply With Quote #2

Plz help me, don't lougt
zirualas is offline
Send a message via Skype™ to zirualas
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 06-24-2010 , 12:04   Re: Weapon script
Reply With Quote #3

Quote:
Originally Posted by zirualas View Post
Plz help me, don't lougt
Typing amx_plugins will only show a certain amount of plugins. Type amx_plugins 11, if you don't see it there, type amx_plugins 21. Keep going up by ten like:

amx_plugins 11
amx_plugins 21
amx_plugins 31

Until you get to a page with no plugins listed. If you don't see your plugin, or you DO see it and it says "BAD LOAD" tell me.

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"\wMaza gravitacija""1");
    
menu_additemvip_menu"\wGive USP""2");
    
    
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_healthid150 ); //Sets health of id to 150
                
set_user_armorid200 ); //Sets armor of id to 200
            
}
        }
        case 
2:
        {
            if( 
is_user_aliveid ) )
            {
                
give_itemid"weapon_usp" ); //Gives id a USP
                
give_itemid"ammo_45acp" ); //Gives id USP ammo
            
}
        }
    }
    
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;

Tested this code in my server. Worked fine.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.

Last edited by GXLZPGX; 06-24-2010 at 12:29.
GXLZPGX is offline
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 06-24-2010 , 12:50   Re: Weapon script
Reply With Quote #4

Wow. Now it's working. I don't understond. It must be magic Thx you guys
Last question, how add admin flag?
Quote:
And i want how you show me how add admin flag :}

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

Quote:
Originally Posted by zirualas View Post
Wow. Now it's working. I don't understond. It must be magic Thx you guys
Last question, how add admin flag?
Go into your server, and open up console. Type in:

rcon_password yourpassword

Of course change "yourpassword" to your rcon password. After that, type:

rcon amx_addadmin yourname

or:

rcon amx_addadmin yoursteamid
__________________
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 , 02:08   Re: Weapon script
Reply With Quote #6

I know how add flag but i don't know how add flag in plugin.
Eg another vipmenu require only "bit" flags.
zirualas is offline
Send a message via Skype™ to zirualas
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 06-25-2010 , 13:40   Re: Weapon script
Reply With Quote #7

Someone, help me
zirualas is offline
Send a message via Skype™ to zirualas
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 06-26-2010 , 09:48   Re: Weapon script
Reply With Quote #8

Quote:
Originally Posted by zirualas View Post
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.
Quote:
Originally Posted by zirualas View Post
Someone, help me
Dont BUMP

write your request here : Suggestions / Requests
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
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