Jump to content

Setar ID permanente


Recommended Posts

estou tentando fazer um set id, que sete o id permanentemente, porém toda vez que o player reconecta o id volta ao id comum
ja tentei usar o recurso setaccountdata, porém o erro permanece, codigo abaixo:
 


function setID(playerSource,commandName,id, newId)
	if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(playerSource)), aclGetGroup ("Console")) then
    	if(id) then
        local playerID = tonumber(id)
			if(playerID) then
			local targetPlayer, targetPlayerName = getPlayerID(playerID)
				if targetPlayer then
          		local targetAcc = getPlayerAccount(targetPlayer)
				setAccountData(targetAcc, "ID", newId)
				setElementData(targetPlayer, "ID", newId)
				exports.InfoDx:addBox(targetPlayer, "Seu id foi setado para "..newId.." pelo staff: "..getPlayerName(playerSource).."", "info")
				exports.InfoDx:addBox(playerSource, "Você setou o id do jogador: "..getPlayerName(targetPlayer).." para: "..newId.."", "success")
				end
        	end
    	end
	end
end
addCommandHandler("setid", setID)

 

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...