Raised This Month: $ Target: $400
 0% 

Help With Script


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 07-26-2010 , 19:29   Re: Help With Script
Reply With Quote #3

PHP Code:
new xpcost 10000
 
new pcvarXp
 
public plugin_init()
{
    
register_clcmd("say buyxp""cmd_buyxp"0"- Buy Experience!")
    
pcvarXp register_cvar("buyxp""30")
}
 
public 
cmd_buyxp(id)
{
    new 
usermoney cs_get_user_money(id)
    new 
name[32]
 
    
get_user_name(idname31)
 
    if ( 
usermoney xpcost )
    {
        
client_print(id,print_center,"You're too poor for this. It's %d!"xpcost)
        return 
PLUGIN_HANDLED
    
}
 
    else
    {
        
cs_set_user_money(idusermoney xpcost ,1)
        
server_cmd ("pm_givexp ^"%s^" %d"nameget_pcvar_num pcvarXp ) )
        return 
PLUGIN_HANDLED
    


Look and replace if it's false.
__________________
You can do anything you set your mind to, man.


Last edited by Devil259; 07-26-2010 at 19:40.
Devil259 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 00:06.


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