Raised This Month: $ Target: $400
 0% 

[CS] Change cost of SGren


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 12-22-2014 , 16:03   Re: [CS] Change cost of SGren
Reply With Quote #1

Sorry for delay, was searching for messages codes so it will look more realistic
(not tested but should work)

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>

#define VERSION "0.0.1"

new price 300

public plugin_init() {
    
register_plugin("SmokeGrenade Price Change"VERSION"Jhob94")
    
    
register_clcmd("sgren""Buy_Smoke")
}

public 
Buy_Smoke(id)
{
    new 
cur_money cs_get_user_money(id)
    
    if(
cur_money price)
        
client_print(idprint_center"#Not_Enough_Money")
    
    else
    {
        if(
user_has_weapon(idCSW_SMOKEGRENADE))
            
client_print(idprint_center"#Cannot_Carry_Anymore")
        
        else
        {
            
give_item(id"weapon_smokegrenade")
            
cs_set_user_money(idcur_money price1)
        }
    }
    
    return 
PLUGIN_HANDLED

__________________
Jhob94 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 15:29.


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