zezim Posted May 18, 2022 Share Posted May 18, 2022 Estou precisando de um sistema de id alto porém comecei a me introduzir nesse ambito de programaçao recentemente se alguem tiver um link de um sistema de id aleatório onde o player venha com um id de 5 letras por exemplo: 54235 Eu agradeço ou puder me ajudar editar esse script pra deixar com id alto agradeço de coraçao pela força. no momento nao tenho recursos financeiros para gastar com mods entretanto gostaria muito de incluir em meu servidor function Start_Id ( _, acc ) if eventName == "onPlayerLogin" then setElementData ( source, "ID", getAccountID(acc) or "N/A" ) outputChatBox ( "#838B83➲ #ff0000LOGIN #838B83➲ Nick: #ff0000 ( ".. getPlayerName(source) .." #ff0000) ID: ( "..(getAccountID(acc) or "N/A") .." )", root, 255,255,255,true) elseif eventName == "onPlayerLogout" then removeElementData( source, "ID" ) outputChatBox ( "#838B83➲ #ff0000LOGIN #838B83➲ Nick: #ff0000 ( ".. getPlayerName(source) .." #ff0000) Deslogou.", 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) function getPlayerID(id) v = false for i, player in ipairs (getElementsByType("player")) do if getElementData(player, "ID") == id then v = player break end end return v end --============================================================================================================================-- --=============================-- ----------- ID PLAYER ------------ --=============================-- function getnick(player, command, id, ...) if(id) then local playerID = tonumber(id) if(playerID) then local Player2 = getPlayerID(playerID) if(Player2) then outputChatBox ( "#838B83➲ #ff0000INFO #ff0000 ➲ #ff0000 Nome do Jogador #ff0000" .. getPlayerName(Player2) .."", player, 255,255,255,true) else outputChatBox ( "#838B83➲ #ff0000ERRO #ff0000 ➲ #ff0000 O Jogador(a) de ID: #ff0000( " .. id .. " ) #ff0000Não Foi Encontrado!", player, 255,255,255,true) end else outputChatBox ( "#838B83➲ #ff0000ERRO #ff0000 ➲ #ff0000 ID: #ff0000( " .. id .. " ) #ff0000Inválido!", player, 255,255,255,true) end else outputChatBox ( "#838B83➲ #ff0000 Use /id #ff0000[#ffffffID#00ff00]", player, 255,255,255,true) end end addCommandHandler("id", getnick) Link to comment
Administrators Tut Posted May 19, 2022 Administrators Share Posted May 19, 2022 Closing this as you have another thread better placed in the Portuguese programming section - https://forum.multitheftauto.com/topic/135857-me-ajudem-pfv-emploro/ Link to comment
Recommended Posts