Raised This Month: $ Target: $400
 0% 

How can i transfer xp with a command?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-28-2012 , 13:01   Re: How can i transfer xp with a command?
Reply With Quote #6

Quote:
Originally Posted by .Dare Devil. View Post
PHP Code:
public plugin_init ()
{
    
register_clcmd "xpmod_give_xp""transfer_xp")
}

public 
transfer_xp(id)
{  
    new 
name[32], xpamount[32], target
    
    read_argv
(1namecharsmax (name))
    
read_argv(2xpamountcharsmax (xpamount))
    
target cmd_target (idname3)
    
    if (!
target)
        return 
PLUGIN_HANDLED

    g_yourxpvariable
[target] = xpamount
    
return PLUGIN_HANDLED

That doesn't transfer xp. It just sets xp for the target. You need to check for number of arguments also.

Also, don't do it for him (especially when you do it wrong). This forum is called "Scripting Help" and not "Do This For Me Forum".
__________________

Last edited by fysiks; 04-28-2012 at 13:02.
fysiks 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 07:50.


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