Raised This Month: $ Target: $400
 0% 

[HELP] give_item flashbangs


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
keyblade
Member
Join Date: Nov 2010
Location: China
Old 07-24-2011 , 11:52   Re: [HELP] give_item flashbangs
Reply With Quote #1

Quote:
Originally Posted by yokomo View Post
Try this for example:
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
 
#define PLUGIN "2,3,4,5,6 FB"
#define VERSION "1.0"
#define AUTHOR "Administrator"
#define FB_AMMO 254
 
public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
 
    
register_clcmd("say /fb""FuntionGiveFB")
}
 
public 
FuntionGiveFB(id)
{
    if(!
is_user_alive(id)) return PLUGIN_HANDLED
 
    
if(user_has_weapon(idCSW_FLASHBANG))
    {
        
cs_set_user_bpammo(idCSW_FLASHBANGcs_get_user_bpammo(idCSW_FLASHBANG)+FB_AMMO)
    }
    else
    {
        
give_item(id,"weapon_flashbang")
        
cs_set_user_bpammo(idCSW_FLASHBANGFB_AMMO)
    }
 
    return 
PLUGIN_HANDLED

thank you! cs_set_user_bpammo can work



and i feel sorry that i post the thread in wrong forum...
keyblade 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:55.


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