Raised This Month: $ Target: $400
 0% 

this code not work


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 08-09-2013 , 13:53   Re: this code not work
Reply With Quote #2

PHP Code:
public item_selected(id)
{
    if( !(
get_user_flags(id) & ADMIN_LEVEL_H) ) {
        
ColorChat(idNORMAL,"^4[Biohazard]:^1 Buy to a ^3Cart Blue^1 gun should be ^4ADMIN^1!!")
        return 
PLUGIN_HANDLED
    
}
    if( !
is_user_alive(id) ) {
        
ColorChat(idNORMAL,"^4[Biohazard]:^1 You have to be alive!")
        return 
PLUGIN_HANDLED
    
}
    new 
admin_name[32]
    
get_user_name(id,admin_name,31)
    
    new 
cash cs_get_user_money(id)
    
    if(
cash >= get_pcvar_num(cvar_cartblue_cash)) {
        
cs_set_user_money(idcash get_pcvar_num(cvar_cartblue_cash))
        
give_cartred(id)
        
ColorChat(id,NORMAL,"^4[Biohazard]:^1 ADMIN: %s You have purchased a ^4Cart Blue^1 gun.",admin_name)
        } else {
        
ColorChat(id,NORMAL,"^4[Biohazard]:^1 ADMIN: %s You don't have enough money! You need: %d $",admin_name,get_pcvar_num(cvar_cartblue_cash))
    }
    return 
PLUGIN_HANDLED


Last edited by akcaliberg; 08-09-2013 at 13:55.
akcaliberg is offline
 



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:53.


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