Raised This Month: $ Target: $400
 0% 

[HELP] Give XP Question


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 11-12-2011 , 11:09   Re: [HELP] Give XP Question
Reply With Quote #6

Okay, thanks everyone.

I've done it like this just with a concmd:
PHP Code:
public XPGive(iPlayerlevelcid) {
    if(!
cmd_access(iPlayerlevelcid3)) {
        return 
PLUGIN_HANDLED
    
}
    static 
arg[35]
    
read_argv(1argcharsmax(arg))
    
    new 
target cmd_target(iPlayerargCMDTARGET_NO_BOTS)
    if(!
target) {
        return 
PLUGIN_HANDLED
    
}
    
    
read_argv(2argcharsmax(arg))
    new 
XP str_to_num(arg)
    
    if(
XP <= 0) {
        
console_print(iPlayer"You need to add more XP Points!")
        if(
XP 0) {
            
console_print(iPlayer"Value must be greater than 0, else user xp_removexp")
        }
        return 
PLUGIN_HANDLED
    
}
    if(
XP 9999999) {
        
console_print(iPlayer"Value is too big to add!")
    }
    
    
iPlayerXP[target] += XP
    
    
static szName[2][32];
    
get_user_name(iPlayerszName[0], charsmax(szName[]))
    
get_user_name(targetszName[1], charsmax(szName[]))
    
    
ColorChat(0GREEN"%s^x03 %s^x01 gave^x03 %s^x04 %i^x01 XP Points!"iPrefixszName[0], szName[1], XP)
    
    static 
iSteamid[2][35]
    
get_user_authid(iPlayeriSteamid[0], charsmax(iSteamid[]))
    
get_user_authid(targetiSteamid[1], charsmax(iSteamid[]))
    
    return 
PLUGIN_HANDLED

__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
 



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


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