I make this solution without Jackson
First the click:
if (source == button name) then
triggerServerEvent ( "givePoints", getLocalPlayer())
function pointToRank ()
local points = tonumber(getAccountData(source,"points"))
If point == nil then
setAccountData (source,"rankName","The name")
setAccountData (source,"rankNumber","The number")
elseif points >= number Points then
Etc . . .
end
end
addEventHandler( "givePoints", getRootElement(),
-- check the account
-- get the account
-- set the points
PointToRank()
-- close the function
I can't test I'm in usa, anyway maybe work