Jump to content

Jonas <#C

Members
  • Posts

    4
  • Joined

  • Last visited

About Jonas <#C

  • Birthday 03/03/1994

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Jonas <#C's Achievements

Vic

Vic (3/54)

0

Reputation

  1. Foi mal demorar '-' Tentei usar DataBase mais não é meu forte, tentei alterar o meta então decide criar outro, então sobre isso do meta podem em ajudar novamente? Desde já agradeço
  2. Olá, Se você está lendo isso já te dou obrigado por tentar me ajudar Bom eu estava fazendo este script (Comecei ontém a programar) Um script que troca um Nome por Um ID Ficando somente o ID Na cabeça ou no torso do player, o ID Não pode ser repetido... e Por aí vai. Sinceramente tou meio perdido sobre isto... Mais espero que você compreenda O erro é basicamente não fazer nada. Tou usando meta.xml e server.lua. Exportei os Functions mais ainda está dando erro, Se não der pra salvar este alguém pode me indicar algum script parecido??? local ids = {} function assignID() for i=1,getMaxPlayers() do if not ids[i] then ids[i] = source setElementData(source,"id",i) break end end end addEventHandler("onPlayerJoin",root,assignID) function startup() ids = {} for k, v in ipairs(getElementsByType("player")) do local id = setElementData(v,"id",k) ids[k] = v end end addEventHandler("onResourceStart",resourceRoot,startup) function freeID() local id = getElementData(source,"id") if not id then return end ids[id] = nil end addEventHandler("onPlayerQuit",root,freeID) function getPlayerID ( player ) return getElementData( player, "id") end function getPlayerFromId ( theID ) if theID then local theID = tonumber(theID) local theplayer for index,player in ipairs(getElementsByType("player")) do if getElementData(player ,"id") == theID then theplayer = player end end return theplayer else return false end end
  3. Ok obrigada irei fazer, é que pensei que americanos poderiam resolver mais rápido mais me enganei irei postar lá obrigado pelo dica. <#
  4. English Hello. Hello, I'm sorry for my English. Well I made this script to change the nick of the player to an ID, and it was not duplicated, it's not working as it should. Could you help with this or see something similar? OBS: I've started to script. Português (Brazil) Olá já venho desculpar meu inglês, Bom eu fiz este script para que trocasse o nick do player para um ID, E não fosse Duplicado, ele não está funcionando como deveria, Poderia ajudar com este ou ver algo semelhante ? OBS: Começei ontém a fazer script local ids = {} function assignID() for i=1,getMaxPlayers() do if not ids[i] then ids[i] = source setElementData(source,"id",i) break end end end addEventHandler("onPlayerJoin",root,assignID) function startup() ids = {} for k, v in ipairs(getElementsByType("player")) do local id = setElementData(v,"id",k) ids[k] = v end end addEventHandler("onResourceStart",resourceRoot,startup) function freeID() local id = getElementData(source,"id") if not id then return end ids[id] = nil end addEventHandler("onPlayerQuit",root,freeID) function getPlayerID ( player ) return getElementData( player, "id") end function getPlayerFromId ( theID ) if theID then local theID = tonumber(theID) local theplayer for index,player in ipairs(getElementsByType("player")) do if getElementData(player ,"id") == theID then theplayer = player end end return theplayer else return false end end
×
×
  • Create New...