Raised This Month: $ Target: $400
 0% 

[help] How can i do this?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
2reason2kill
Senior Member
Join Date: Feb 2011
Old 06-18-2011 , 05:30   [help] How can i do this?
Reply With Quote #1

Im trying to do if the player dosent have Enough money Its print somting

like

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

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new Cost

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_concmd("say /Reviveme","revive")
    
Cost register_cvar("revive_cost","16000")
}

public 
revive(id)
{
    
    if(!
is_user_alive(id) )
    {
        new 
money cs_get_user_money(id)
        new 
cost get_pcvar_num(Cost);
        (
money >= cost)
        
cs_user_spawn(id)
        
cs_set_user_money(idmoney -cost)
    }
    else
    {
        
client_print(idprint_chat,"You havent Enough money To buy this item")
    } 
Is it Right?

Last edited by 2reason2kill; 06-18-2011 at 05:31. Reason: Anti spam
2reason2kill is offline
 


Thread Tools
Display Modes

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 23:27.


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