-.Paradox.- Posted September 11, 2013 Share Posted September 11, 2013 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
manawydan Posted September 12, 2013 Share Posted September 12, 2013 try addCommandHandler ( "setxp", function ( thePlayer, _,who,XP ) local XP = tonumber ( XP ) or 0 local lPlayer = getPlayerFromName ( who ) if ( lPlayer ) then setElementData( lPlayer,"exp",XP ) end end ) Link to comment
-.Paradox.- Posted September 12, 2013 Author Share Posted September 12, 2013 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
manawydan Posted September 12, 2013 Share Posted September 12, 2013 lol You're welcome! Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now