ola eu gostaria de saber como faço para mudar o id dos players,não sei mexer com scripts,o meu script de id é esse:
function Start_Id ( _, acc )
if eventName == "onPlayerLogin" then
setElementData ( source, "ID", getAccountID(acc) or "N/A" )
outputChatBox ( "#00ff00✘ #ffffffLOGIN #00ff00✘➺ #ffffffNick: #00ff00 ( ".. getPlayerName(source) .." #00ff00) #ffffffID: #00ff00( "..(getAccountID(acc) or "N/A") .." )", root, 255,255,255,true)
elseif eventName == "onPlayerLogout" then
removeElementData( source, "ID" )
outputChatBox ( "#00ff00✘ #ffffffLOGIN #00ff00✘➺ #ffffffNick: #00ff00 ( ".. getPlayerName(source) .." #00ff00) #ffffffDeslogou.", root, 255,255,255,true)
elseif eventName == "onResourceStart" then
for _, player in pairs(getElementsByType("player")) do
local acc = getPlayerAccount(player)
if not isGuestAccount(acc) then
setElementData( source, "ID", getAccountID(acc) or "N/A" )
end
end
end
end
addEventHandler("onResourceStart", resourceRoot, Start_Id)
addEventHandler("onPlayerLogout", root, Start_Id)
addEventHandler("onPlayerLogin", root, Start_Id)
função getPlayerID (id)
v = false
para i, player em ipairs (getElementsByType ("player")) faz
se getElementData (player, "ID") == id em seguida
v = player
break
end
end
return v
end
- === ==================================================== ==================================================== ===================== -
- =========================== ==== -
----------- ID PLAYER ------------
- ================= ============ -
função getnick (jogador, comando, id, ...)
if (id) então
local playerID = número (id)
if (playerID) e
local Player2 = getPlayerID (playerID)
se (Player2) e
outputChatBox ("# 00ff00✘ #ffffffINFO # 00ff00✘➺ #ffffff Nome do jogador # 00ff00" .. getPlayerName (player2) .. "", player, 255.255.255, verdadeiro)
else
outputChatBox ("# 00ff00✘ #ffffffERRO # 00ff00✘➺ #ffffff O Jogador (a) de ID: # 00ff00 (" .. id .. ") # ffffff Não foi encontrado! ", player, 255.255.255, verdadeiro)
end
else
outputChatBox (" # 00ff00✘ #ffffffERRO # 00ff00✘➺ #ffffff ID: # 00ff00 (".. id ..") # ffffffInválido! ", player, 255.255.255,verdadeiro)
fim
mais
outputChatBox ("# 00ff00✘ #ffffffERRO # 00ff00✘➺ #ffffffUse / id # 00ff00 [# ffffffID # 00ff00]", player, 255.255.255, true)
end
end
addCommandHandler ("id", getnick)
alguem pode me ajudar?