zezim
Members-
Posts
43 -
Joined
-
Last visited
-
Days Won
1
Everything posted by zezim
-
Essa verificação seria boa para utilizar? if fileExists("nome_do_arquivo.lua") then -- ou .luac, caso esteja compilado fileDelete("nome_do_arquivo.lua") end Alguém poderia me auxiliar como utilizá-la e para que serve?
-
Alguém sabe me dizer como posso usar a animação sex_1_cum_p e sex_1_cum_w ? andei consultando a aba animations da wiki porém vi que não tinha lá, acredito que retiraram. A unica forma de conseguir a animação agora seria recriando ela?
-
Gostaria de saber se há como bloquear para não salvar arquivos .DFF e .TXD na pasta de cache do cliente, como exemplo carros e texturas de modelagens andei pesquisando mas não encontrei muito a respeito para sanar de fato essa duvida Sabemos que mesmo compilando o arquivo é possível o player usar a .TXD e DFF então ignoremos essa opção fiquei hesitando em usar o download"false" e é o que de fato estou testando agora - não testei ainda -, seria essa uma opção alternável? PS: A função download indo no meta.xml não funciona. torna a deixar os arquivos oriundos do GTA SA. Seria a única forma uma proteção de código com licença?
-
Gostaria de saber se existe algum evento assim como o getCommandHandler para poder identificar as binds dentro de um script compilado Pois eu tenho um identificador de comandos que após eu ativar um determinado script, ele identifica todos os comandos disponíveis dentro de um script compilado. Entretanto, gostaria de saber se há algo semelhante para poder identificar as BINDS
-
Olá pessoal, bom dia, boa tarde ou boa noite, independente do horário que estejam lendo. Gostaria de pedir ajuda de vocês sobre esse script, pois estou quebrando cabeça entretanto não consigo resolver. Observem a linha 61 e 103. Após adicionar o getPlayerMoney na 61 para verificar se o player caído possuí o valor para poder ser enviado para o agente do samu ou não, ela funciona, entretanto, após eu setar money em mim no painel P o money desce pra 0 '-' Já na linha 103 eu não consigo colocá-la. Eu gostaria de verificar se o player desmaiado tem money ou não, caso nao tenha, não enviar os 3000 mil para não ficar com saldo negativo. Poderiam dar uma olhada no meu script se possivel pfv? local url = "" function msg(mensagem) sendOptions = { queueName = "dcq", connectionAttempts = 10, connectionTimeout = 20000, formFields = { content = "```"..mensagem.."```", }, } fetchRemote(url, sendOptions, callBack) end function callBack() end Tempo_Reanimar = {} function Remove_Colete (hitElement, Danos) setPedArmor(hitElement, getPedArmor(hitElement) -Danos) end addEvent("DNL:setPedAmor(Danos)", true) addEventHandler("DNL:setPedAmor(Danos)", root, Remove_Colete) --=============================-- -------- VERIFICAR HT PED ------- --=============================-- function getHealthPlayer () for i, player in pairs (getElementsByType("player")) do if getElementHealth(player) > 0 and getElementHealth(player) < 50 then if getElementData(player, "DNL:Derrubado") == false then setElementFrozen(player, true) toggleAllControls(player, false, true, false) setElementData(player, "DNL:Derrubado", true) removePedFromVehicle(player) setPedAnimation(player, "SWEET", "Sweet_injuredloop", -1, false, false, false, true) triggerClientEvent(player, "DNL:HP_30", root) outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffLigue para o resgate #ffffffVocê está muito ferido", player, 255,255,255,true) Tempo_Reanimar = setTimer(function(player) if getElementData(player, "DNL:Derrubado") == true then setElementFrozen(player, false) toggleAllControls(player, true) killPlayer(player) setElementData(player, "DNL:Derrubado", false) outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffVocê não foi reanimado e morreu", player, 255,255,255,true) end end, 300000, 1, player) end end if getElementHealth(player) > 50 and getElementData(player, "DNL:Derrubado") == true then setElementData(player, "DNL:Derrubado", false) setPedAnimation(player, false) toggleAllControls(player, true) setElementFrozen(player, false) triggerClientEvent(player, "DNL:Fechar_HP_30", root) --else if (getPlayerMoney(player) >= 3000) then takePlayerMoney(player, 3000) outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffVocê foi reanimado!", player, 255,255,255,true) --end end end end setTimer(getHealthPlayer, 50, 0) function Verificar_Anim () for i, player in pairs (getElementsByType("player")) do if getElementHealth(player) > 0 and getElementHealth(player) < 30 then if getElementData(player, "DNL:Derrubado") == true then setPedAnimation(player, "SWEET", "Sweet_injuredloop", -1, false, false, false, true) end end end end setTimer(Verificar_Anim, 1400, 0) --=============================-- ----------- CURAR PED ----------- --=============================-- function Curar_Cidadao (source, _, id, thePlayer, command, amount) if(id) then local playerID = tonumber(id) if(playerID) then local Player_2 = getPlayerID(playerID) if isElement(Player_2) then if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount(source)), aclGetGroup ( "Samu") ) then if Player_2 == source then outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffVocê não pode se curar", source, 255,255,255,true) return end local medico_X, medico_Y, medico_Z = getElementPosition ( source ) local vitima_X, vitima_Y, vitima_Z = getElementPosition ( Player_2 ) local dist = getDistanceBetweenPoints3D ( medico_X, medico_Y, medico_Z, vitima_X, vitima_Y, vitima_Z ) if ( dist < 5 ) then if getElementData(source, "DNL:Curando") == false then if getElementData(Player_2, "DNL:Derrubado") == true then setPedAnimation( source, "MEDIC", "CPR", 4500, true, false, false, false) setElementData(source, "DNL:Curando", true) setTimer ( function() setElementHealth(Player_2, 100) setElementData(source, "DNL:Curando", false) outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffVocê Foi Curado Pelo Cidadao #00ff00"..getPlayerName(source).."", Player_2, 255,255,255,true) else if (getPlayerMoney(player) >= 3000) then givePlayerMoney(source, 3000) end outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffVocê Curou o Cidadão #00ff00"..getPlayerName(Player_2).."", source, 255,255,255,true) msg( "O Jogador "..getPlayerName(Player_2).." (ID: "..(getElementData(Player_2, "ID") or N/A)..")\nFoi Curado Por\n"..getPlayerName(source).." (ID: "..(getElementData(source, "ID") or N/A)..")" ) end, 4500, 1 ) else outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffEsse Cidadao não precisa ser curado", source, 255,255,255,true) end else outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffVocê já está curando algum Cidadao", source, 255,255,255,true) end else outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffVocê precisa chegar mais perto do Cidadao", source, 255,255,255,true) end else outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffApenas membros do resgate pode curar Cidadaoes", source, 255,255,255,true) end else outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffO Cidadao(a) Não Foi Encontrado", source, 255,255,255,true) end else outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffUse /curar [#00ff00Nick#ffffff]", source, 255,255,255,true) end end end addCommandHandler("curar", Curar_Cidadao) --=============================-- ----------- ANTI BUG ------------ --=============================-- function Morrer () if getElementData(source, "DNL:Derrubado") == true then setElementData(source, "DNL:Derrubado", false) setPedAnimation(source, false) setElementFrozen(source, false ) toggleAllControls(source, true) triggerClientEvent(source, "DNL:Fechar_HP_30", source) end end addEventHandler("onPlayerWasted", root, Morrer) function Quit() if getElementData(source, "DNL:Derrubado") == true then setElementData(source, "DNL:Derrubado", false) end end addEventHandler('onPlayerQuit', root, Quit) ------------- IGNORA ------------ 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
-
Pessoal, estou com problemas nesse meu código eu não consigo de maneira alguma resolver o erro do blip vcs podem me ajudar corrigindo meu código para eu saber oq há de errado? Se puderem me dar uma atenção pois ainda sou iniciante em scripts e não sei se editei o script corretamente. Poderiam revisar? agradeço a atenção muito obg de coração pela humildade se puder ajudar a cada uns 5 min da esses erros ai e quando eu mato o jogador desmaiado ou curo ele costuma dar alguns erros q vo udescrever logo abaixo: Erros: Line 86: Bad argument @ 'setElementVisibleTo' [Expected element at argument 1] Line 87: Bad argument @ 'setElementVisibleTo' [Expected element at argument 1] Line 126: Bad argument @ 'setElementVisibleTo' [Expected element at argument 1] Line 127: Bad argument @ 'setElementVisibleTo' [Expected element at argument 1] Line 147: Bad Argument @ 'destroyElement' [Expected element at argument 1,got table] Tempo_Reanimar = {} blip = {} function Remove_Colete (hitElement, Danos) setPedArmor(hitElement, getPedArmor(hitElement) -Danos) end addEvent("DNL:setPedAmor(Danos)", true) addEventHandler("DNL:setPedAmor(Danos)", root, Remove_Colete) --=============================-- -------- VERIFICAR HT PED ------- --=============================-- function getHealthPlayer () for i, player in pairs (getElementsByType("player")) do if getElementHealth(player) > 0 and getElementHealth(player) < 50 then if getElementData(player, "DNL:Derrubado") == false then setElementFrozen(player, true) toggleAllControls(player, false, true, false) setElementData(player, "DNL:Derrubado", true) removePedFromVehicle(player) setPedAnimation(player, "SWEET", "Sweet_injuredloop", -1, false, false, false, true) triggerClientEvent(player, "DNL:HP_30", root) outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffLigue para o resgate #ffffffVocê está muito ferido", player, 255,255,255,true) Tempo_Reanimar = setTimer(function(player) if getElementData(player, "DNL:Derrubado") == true then setElementFrozen(player, false) toggleAllControls(player, true) killPlayer(player) setElementData(player, "DNL:Derrubado", false) outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffVocê não foi reanimado e morreu", player, 255,255,255,true) end end, 300000, 1, player) end end if getElementHealth(player) > 50 and getElementData(player, "DNL:Derrubado") == true then setElementData(player, "DNL:Derrubado", false) setPedAnimation(player, false) toggleAllControls(player, true) setElementFrozen(player, false) triggerClientEvent(player, "DNL:Fechar_HP_30", root) takePlayerMoney(player, 3000) outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffVocê foi reanimado e pagou $3000", player, 255,255,255,true) end end end setTimer(getHealthPlayer, 50, 0) function Verificar_Anim () for i, player in pairs (getElementsByType("player")) do if getElementHealth(player) > 0 and getElementHealth(player) < 30 then if getElementData(player, "DNL:Derrubado") == true then setPedAnimation(player, "SWEET", "Sweet_injuredloop", -1, false, false, false, true) end end end end setTimer(Verificar_Anim, 1400, 0) --=============================-- ----------- CURAR PED ----------- --=============================-- function Curar_Cidadao (source, _, id, thePlayer, command, amount) if(id) then local playerID = tonumber(id) if(playerID) then local Player_2 = getPlayerID(playerID) if isElement(Player_2) then if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount(source)), aclGetGroup ( "Samu") ) then if Player_2 == source then outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffVocê não pode se curar", source, 255,255,255,true) return end local medico_X, medico_Y, medico_Z = getElementPosition ( source ) local vitima_X, vitima_Y, vitima_Z = getElementPosition ( Player_2 ) local dist = getDistanceBetweenPoints3D ( medico_X, medico_Y, medico_Z, vitima_X, vitima_Y, vitima_Z ) if ( dist < 5 ) then if getElementData(source, "DNL:Curando") == false then if getElementData(Player_2, "DNL:Derrubado") == true then setPedAnimation( source, "MEDIC", "CPR", 4500, true, false, false, false) setElementData(source, "DNL:Curando", true) setTimer ( function() setElementHealth(Player_2, 100) setElementData(source, "DNL:Curando", false) outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffVocê Foi Curado Pelo Cidadao #00ff00"..getPlayerName(source).."", Player_2, 255,255,255,true) givePlayerMoney(source, 3000) outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffVocê Curou o Cidadão #00ff00 e recebeu um extra de $ 3000 #00ff00 "..getPlayerName(Player_2).."", source, 255,255,255,true) setElementVisibleTo(blip, root, false) setElementVisibleTo(blip, source, false) end, 4500, 1 ) else outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffEsse Cidadao não precisa ser curado", source, 255,255,255,true) end else outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffVocê já está curando algum Cidadao", source, 255,255,255,true) end else outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffVocê precisa chegar mais perto do Cidadao", source, 255,255,255,true) end else outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffApenas membros do resgate pode curar Cidadaoes", source, 255,255,255,true) end else outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffO Cidadao(a) Não Foi Encontrado", source, 255,255,255,true) end else outputChatBox ( "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffUse /curar [#00ff00Nick#ffffff]", source, 255,255,255,true) end end end addCommandHandler("curar", Curar_Cidadao) function helpCommand(source) for i, player in pairs (getElementsByType("player")) do if getElementData(source, "DNL:Derrubado") then local accName = getAccountName ( getPlayerAccount ( player ) ) outputChatBox("Você ligou para o número de emergência! Aguarde.", source) if ( isObjectInACLGroup ("user."..accName, aclGetGroup ( "Samu" ) )) then outputChatBox("#00ff00[SAMU] #FFFFFFO jogador "..getPlayerName(source).." #FFFFFFestá pedindo socorro! Procurem o blip de coração.", player, 255, 255, 255, true) outputChatBox("#00ff00[SAMU] #FFFFFFO ID da chamada é: #00ff00("..getElementData(source, "ID")..")", player, 255, 255, 255, true) local x, y, z = getElementPosition(source) blip = createBlip(x, y, z, 21) setElementVisibleTo(blip, root, false) setElementVisibleTo(blip, player, true) timerMorrer = setTimer(function(player) setElementVisibleTo(blip, root, false) setElementVisibleTo(blip, player, false) end, 300000, 1, player) end else outputChatBox("Você não precisa de atendimento.", source) end end end addCommandHandler("samu", helpCommand) --=============================-- ----------- ANTI BUG ------------ --=============================-- function Morrer () if getElementData(source, "DNL:Derrubado") == true then setElementData(source, "DNL:Derrubado", false) setPedAnimation(source, false) setElementFrozen(source, false ) toggleAllControls(source, true) --setElementVisibleTo(blip, source, player, false) destroyElement(blip) triggerClientEvent(source, "DNL:Fechar_HP_30", source) end end addEventHandler("onPlayerWasted", root, Morrer) function Quit() if getElementData(source, "DNL:Derrubado") == true then setElementData(source, "DNL:Derrubado", false) destroyElement(blip) end end addEventHandler('onPlayerQuit', root, Quit) ------------- IGNORA ------------ 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
-
Hey guys, whats up! Can you help me with this id system? What is wrong in my code? I tried anyway to modify it but I couldn't. When I type the command /id to see the player's id, I can't see it. When I format the code to standard and put the low id system, I get it. If you can help me, I would really appreciate it! function genRandomID() local rnumber = "" local chars = "1234567890" for i = 1, 5 do -- Aqui você define a quantidade de digitos, aqui vai ser gerado um numero com 5 digitos local rand = math.random(#chars) rnumber = rnumber .. chars:sub(rand, rand) end return rnumber end local randomID = genRandomID() function Start_Id ( _, acc ) if eventName == "onPlayerLogin" then setElementData(source, "ID", randomID 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", randomID 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) who can help pls i beg
-
Como meio de disseminar a democracia do conhecimento venho pedir ajuda à vocês em favor daqueles que necessitarão deste sistema assim como estou precisando hoje e virão pesquisá-lo no google e não acharão, senão por este post. Podem me ajudar me informando o que está errado nesse sistema de ID? Eu digito /id que no caso é para ver o id só que depois de setar a elementdata de id aleatorio eu não consigo ver o id alto eu tentei mudar o codigo de toda forma mas nao consegui function genRandomID() local rnumber = "" local chars = "1234567890" for i = 1, 5 do -- Aqui você define a quantidade de digitos, aqui vai ser gerado um numero com 5 digitos local rand = math.random(#chars) rnumber = rnumber .. chars:sub(rand, rand) end return rnumber end local randomID = genRandomID() function Start_Id ( _, acc ) if eventName == "onPlayerLogin" then setElementData(source, "ID", randomID 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", randomID 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)
-
Cara muito obrigado de coração eu consegui integrar ao save system e agora ta funcionando! VLW MSM EU TE AMO CARA DEUS TE ILUMINE PARABENS PELA HUMILDADE EM AJUDAR OS PEQUENINOS
-
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)
-
Pessoal eu tentei muito achar antes de vir perturbar vocês. Eu estou precisando de um sistema de ID alto aleatório onde o player venha com um id random exemplo: 54631 Eu nao tenho condiçoes de comprar mods e comecei mexer com scripts há 1 mes porem e algo que me ajudou sair do inicio de depressão. Prefiro perder meu tempo com edição amadora de scripts do que jogando. E por conseguinte, estou me familiarizando cada vez mais com a programação, área da qual almejava em minhas utopias durante 1 ano de estudos, motivo principal de meu inicio de depressão. Aqui está o código de meu sistema de id atual, se vc tiver o link direto pro Random ID ou puder ajudar editar eu agradeço de coração : 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)
-
PODEM FECHAR O TOPICO EU RESOLVI SOZINHO foi so apagar a sethud
-
Gente eu não tenho condições de comprar mods e estou me virando procurando mods com debugscript 3 limpo. Essa dashboard ao eu ligá-la ela ja aparece automaticamente na tela e quando eu ligo ela e reentro ela aparece no painel de login tres barrinhas que sao referentes a hud e fica na dashboard alguem pode ajudar? local screenW,screenH = guiGetScreenSize() local resW, resH = 1366,768 local x, y = (screenW/resW), (screenH/resH) local Font_1 = dxCreateFont("files/fonts/font.ttf") function dashboard() if (not isPlayerMapVisible()) then local x1, y1, z1 = getElementPosition (localPlayer) local localidade = getZoneName (x1, y1, z1) local Vida = math.floor(getElementHealth(getLocalPlayer())) local Colete = math.floor(getPedArmor(getLocalPlayer())) local players = getElementsByType( "player" ) local ID = getElementData(getLocalPlayer(), "ID") or "N/A" local Emprego = getElementData (localPlayer,"Emprego") or "Desempregado" local Fome = getElementData ( localPlayer, "hunger" ) or 0 local Sede = getElementData ( localPlayer, "sede" ) or 0 local Cargo = getElementData ( localPlayer, "Cargo" ) or "Cidadão" local Level = getElementData ( localPlayer, "Level" ) or "N/A" local Exp = getElementData ( localPlayer, "minutes" ) or "N/A" local Dinheiro_Server = getElementData ( localPlayer, "VIP:Moedas" ) or 0 local Cidade = getElementData ( localPlayer, "Cidade" ) or "Estrangeiro" local Cargo = getElementData ( localPlayer, "cargo" ) or "Cidadão" local idade = getElementData(localPlayer, "AirNew_RG_DataDeNascimento") or 0 local time = getRealTime() local hours = time.hour local minutes = time.minute local seconds = time.second local Wanted = getPlayerWantedLevel(getLocalPlayer()) local jogadores = #getElementsByType("player") local nome = getPlayerName(getLocalPlayer()) local RG = getElementData(localPlayer, "ID") or "0" local Dinheiro_Sujo = tonumber(getElementData ( getLocalPlayer(), "Dinheiro_AirNewSCR" )) or 0 local components = {"area_name", "radio", "vehicle_name"} local Dinheiro_Mao = getPlayerMoney ( localPlayer ) or 0 if Dinheiro_Mao > 0 then Dinheiro_Mao = convertNumber ( Dinheiro_Mao ) else Dinheiro_Mao = Dinheiro_Mao end if Dinheiro_Sujo > 0 then Dinheiro_Sujo = convertNumber ( Dinheiro_Sujo ) else Dinheiro_Sujo = Dinheiro_Sujo end local Dinheiro_Banco = getElementData ( localPlayer, "Bank:Caixa" ) or 0 if Dinheiro_Banco > 0 then Dinheiro_Banco = convertNumber ( Dinheiro_Banco ) else Dinheiro_Banco = Dinheiro_Banco end setElementData ( localPlayer, "Dinheiro no Banco", "$"..Dinheiro_Banco.."" ) if (hours >= 0 and hours < 10) then hours = "0"..time.hour end if (minutes >= 0 and minutes < 10) then minutes = "0"..time.minute end if (seconds >= 0 and seconds < 10) then seconds = "0"..time.second end local meses = {"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"} local dias = {"Sunday ", "Segunda Feira", "Terça Feira", "Quarta Feira", "Quinta Feira", "Fri ", "Sabado"} local dia = ("%02d"):format(time.monthday) local ano = ("%02d"):format(time.year + 1900) local diaa = dias[time.weekday + 1] local mes = meses[time.month + 1] local MaxDePlayers = "100" exports["Blur"]:dxDrawBluredRectangle(x*235, y*133, x*884, y*515, tocolor(255, 255, 255, 171)) dxDrawImage(x*235, y*133, x*884, y*515, "files/images/fundo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(nome, x*303, y*216, x*424, y*245, tocolor(240, 243, 251, 223), 1.00, Font_1, "left", "center", false, false, false, false, false) dxDrawText(jogadores.."/"..MaxDePlayers.."Players On", x*613, y*595, x*749, y*612, tocolor(240, 243, 251, 223), 0.90, Font_1, "center", "center", false, false, false, false, false) dxDrawText(ID, x*490, y*214, x*532, y*245, tocolor(240, 243, 251, 223), 1.00, Font_1, "center", "center", false, false, false, false, false) dxDrawText(Dinheiro_Mao, x*315, y*501, x*507, y*519, tocolor(240, 243, 251, 223), 1.00, Font_1, "left", "bottom", false, false, false, false, false) dxDrawText(Dinheiro_Banco, x*315, y*549, x*507, y*567, tocolor(240, 243, 251, 223), 1.00, Font_1, "left", "bottom", false, false, false, false, false) dxDrawText(Dinheiro_Sujo, x*315, y*598, x*507, y*616, tocolor(240, 243, 251, 223), 1.00, Font_1, "left", "bottom", false, false, false, false, false) dxDrawText(Level, x*618, y*212, x*696, y*226, tocolor(240, 243, 251, 223), 1.00, Font_1, "left", "top", false, false, false, false, false) dxDrawText(idade.. "Anos de Idade", x*303, y*317, x*424, y*346, tocolor(240, 243, 251, 223), 1.00, Font_1, "center", "center", false, false, false, false, false) dxDrawText(Exp, x*639, y*254, x*717, y*268, tocolor(240, 243, 251, 223), 1.00, Font_1, "left", "top", false, false, false, false, false) dxDrawText(Emprego, x*313, y*393, x*545, y*422, tocolor(240, 243, 251, 223), 1.00, Font_1, "left", "center", false, false, false, false, false) dxDrawText(localidade, x*968, y*603, x*1085, y*619, tocolor(240, 243, 251, 223), 0.90, Font_1, "left", "bottom", false, false, false, false, false) dxDrawText(Cidade, x*303, y*268, x*474, y*296, tocolor(240, 243, 251, 223), 1.00, Font_1, "left", "center", false, false, false, false, false) dxDrawText(Cargo, x*313, y*437, x*545, y*466, tocolor(240, 243, 251, 223), 1.00, Font_1, "left", "center", false, false, false, false, false) dxDrawText(hours..":"..minutes, x*858, y*605, x*920, y*619, tocolor(240, 243, 251, 223), 0.90, Font_1, "center", "bottom", false, false, false, false, false) if Wanted > 0 then dxDrawText("Nome Sujo ("..Wanted..")", x*862, y*573, x*973, y*590, tocolor(240, 243, 251, 223), 0.90, Font_1, "left", "center", false, false, false, false, false) else dxDrawText("Nome Limpo", x*862, y*573, x*973, y*590, tocolor(240, 243, 251, 223), 0.90, Font_1, "left", "center", false, false, false, false, false) end dxDrawRectangle(x*894, y*217, x*201/100*Sede, y*26, tocolor(7, 114, 248, 253), true) dxDrawRectangle(x*894, y*267, x*201/100*Fome, y*26, tocolor(251, 137, 3, 253), true) dxDrawRectangle(x*894, y*316, x*201/100*Vida, y*26, tocolor(242, 28, 11, 208), true) dxDrawRectangle(x*894, y*365, x*201/100*Colete, y*26, tocolor(48, 92, 204, 208), true) dxDrawText("brazucarp.com.br", x*873, y*450, x*1075, y*472, tocolor(255, 255, 255, 255), 1.2, Font_1, "left", "center", false, false, false, false, false) dxDrawText("discord.com/EmBreve", x*873, y*497, x*1075, y*519, tocolor(255, 255, 255, 255), 1.2, Font_1, "left", "center", false, false, false, false, false) end end function criarPed() local skin = getElementModel(localPlayer) x1, y1, z1 = getCameraMatrix() pedS = createPed(skin, x1, y1, z1) pedHype = exports.objectPreview:createObjectPreview(pedS, 0, 0, 170, x*425, y*187, x*500, y*407, false, true, true) end function destruirPed() exports.objectPreview:destroyObjectPreview(pedHype) destroyElement(pedS) pedS = nil end local isDXVisible = false bindKey ("TAB", "both", function() if isDXVisible then removeEventHandler( "onClientRender", root, dashboard ) destruirPed() else addEventHandler( "onClientRender", root, dashboard ) criarPed() end isDXVisible = not isDXVisible end) function convertNumber ( number ) local formatted = number while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1.%2') if ( k==0 ) then break end end return formatted end function setHud() addEventHandler("onClientRender", getRootElement(), dashboard) setPlayerHudComponentVisible("armour", false) setPlayerHudComponentVisible("wanted", false) setPlayerHudComponentVisible("weapon", false) setPlayerHudComponentVisible("money", false) setPlayerHudComponentVisible("health", false) setPlayerHudComponentVisible("clock", false) setPlayerHudComponentVisible("breath", false) setPlayerHudComponentVisible("ammo", false) for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, false ) end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), setHud) function removeHud() setPlayerHudComponentVisible("armour", false) setPlayerHudComponentVisible("wanted", true) setPlayerHudComponentVisible("weapon", true) setPlayerHudComponentVisible("money", true) setPlayerHudComponentVisible("health", false) setPlayerHudComponentVisible("clock", true) setPlayerHudComponentVisible("breath", true) setPlayerHudComponentVisible("ammo", true) end addEventHandler("onClientResourceStop", getResourceRootElement(getThisResource()), removeHud)
