Jump to content

Little help needed


-.Paradox.-

Recommended Posts

Hello i have a little problem this dont set player xp

addCommandHandler ( "setxp", 
    function ( thePlayer, _, who, XP ) 
        local XP = tonumber ( XP ) or 0 
        local ThePlayer = getPlayerFromName ( who ) 
        if ( ThePlayer ) then 
            setElementData( ThePlayer, XP )  
        end 
    end 
) 

thanks for help

Link to comment

Didn't work, but when i tried

addCommandHandler ( "setxp", 
    function ( thePlayer, _, who, XP ) 
        local XP = tonumber ( XP ) or 0 
        local ThePlayer = getPlayerFromName ( who ) 
        if ( ThePlayer ) then 
           setElementData( ThePlayer,"XP",XP ) 
        end 
    end 
) 

Worked perfectly anyway thanks its fixed now :)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...