Jump to content

Search the Community

Showing results for tags 'ajuda'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

  1. Como fasso para tirar o chat T na tela de login Do Meu servidor, Pois no login se O user tiver letra t ele abre o chat E solta binds sozin E tambem Fica apertando os outros paineis Por exemplo O painel de estilo de andar na Letra U se o user ou senha Tiver u ele fica abrindo o painel Alguem Pode me falar como proceder?
  2. Como posso criar um script simples de chamar polícia? exemplo: /policia aí apenas a pessoa q está na acl recebe o chamado e aparece o blip no gps da pessoa q está na acl
  3. Preciso de ajuda nesse scritp, deixando bem claro que nao entendo a linguagem, mas não tenho condições de pagar alguem pra fazer isso.. Por isso que pesso ajuda de vocês humildemente... È um script policial de revistar, ta tudo funcionando perfeitamente, mas unico problema que eu estou tendo, é que quando eu revisto alguem, não aparece a arma que a pessoa esta portando entende? vou deixar aqui o Serve.lua ------------ Variaveis Comando = "policial" ACL = "Policial" -------------------------------- Funções Iniciais function AbrirPainel(source, comando, id) if(id) then local playerID = tonumber(id) if(playerID) then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup(ACL)) then if getElementData(source, "TS:Abordando") then return end local Jogador = getPlayerID(playerID) if not Jogador then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffNão foi possivel encontrar o jogador !", "info") return end --if Jogador == source then return end local cx, cy, cz = getElementPosition ( Jogador ) local px, py, pz = getElementPosition ( source ) local distancia = getDistanceBetweenPoints3D ( cx, cy, cz, px, py, pz ) if distancia >= 2 then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffChegue mais perto do jogador !", "info") return end triggerClientEvent(source, "TS:AbrirPolicial", source) setElementData(source, "TS:Abordando", Jogador) toggleAllControls ( source, false ) end end end end addCommandHandler(Comando, AbrirPainel) function FecharPolicial (source) toggleAllControls (source, true ) end addEvent("TS:FecharPolicial", true) addEventHandler("TS:FecharPolicial", root, FecharPolicial) function Algemar (source) local Jogador = getElementData(source, "TS:Abordando") if Jogador then if getElementData(Jogador, "TS:Algemado") == false then local cx, cy, cz = getElementPosition ( Jogador ) local px, py, pz = getElementPosition ( source ) local distancia = getDistanceBetweenPoints3D ( cx, cy, cz, px, py, pz ) if distancia >= 2 then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffChegue mais perto do jogador !", "info") return end toggleAllControls (Jogador, false ) setElementData(Jogador, "TS:Algemado", true) setElementFrozen(Jogador, true) triggerClientEvent(Jogador, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffVocê foi algemado!", "info") setPedAnimation( Jogador, "GRAVEYARD", "mrnM_loop", -1, true, false, false, false) else local cx, cy, cz = getElementPosition ( Jogador ) local px, py, pz = getElementPosition ( source ) local distancia = getDistanceBetweenPoints3D ( cx, cy, cz, px, py, pz ) if distancia >= 2 then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffChegue mais perto do jogador !", "info") return end setPedAnimation(Jogador, nil) toggleAllControls (Jogador, true ) setElementData(Jogador, "TS:Algemado", false) setElementFrozen(Jogador, false) triggerClientEvent(Jogador, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffVocê foi desalgemado!", "info") end end end addEvent("TS:Algemar", true) addEventHandler("TS:Algemar", root, Algemar) function Revistar (source) local Jogador = getElementData(source, "TS:Abordando") if Jogador then setPedAnimation( source, "POLICE", "plc_drgbst_01", 3100, true, false, false, false) triggerClientEvent(Jogador, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffO Policial está te revistando!", "info") if getPlayerWantedLevel(Jogador) >= 1 then outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff O jogador está pedido!",source,255,0,0,true) else outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff O jogador não está pedido!",source,255,0,0,true) end if getElementData(Jogador,"Habilitacoes:Carros") == true then outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff Tem Habilitação para Carros!",source,255,0,0,true) else outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff Não tem Habilitação de Carros",source,255,0,0,true) end if getElementData(Jogador,"Habilitacoes:Motos") == true then outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff Tem Habilitação para Motos!",source,255,0,0,true) else outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff Não tem Habilitação de Motos!",source,255,0,0,true) end if getElementData(Jogador,"Habilitacoes:Caminhoes") == true then outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff Tem Habilitação para Caminhões!",source,255,0,0,true) else outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff Não tem Habilitação de Caminhão!",source,255,0,0,true) end if getElementData(Jogador,"Habilitacoes:Carretas") == true then outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff Tem Habilitação para Carretas!",source,255,0,0,true) else outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff Não tem Habilitação de Carretas!",source,255,0,0,true) end if getElementData(Jogador,"Habilitacoes:Helicopteros") == true then outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff Tem Habilitação para Helicopteros!",source,255,0,0,true) else outputChatBox("#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff Não tem Habilitação de Helicopteros!",source,255,0,0,true) end local Quantidade = getElementData(source, "TS:"..Droga_Selecionada.."") or 0 for slot = 0, 12 do local Armas = getPedWeapon (Jogador, slot) local Municao = getPedTotalAmmo (Jogador, slot) if Armas > 0 then if Municao > 0 then weapon_nome = getWeaponNameFromID (Armas) outputChatBox ("* "..weapon_nome.." #3a3a3a»#25e014 "..Municao.." Bala(s)!", source,255,255,255,true) end end end end end addEvent("TS:Revistar", true) addEventHandler("TS:Revistar", root, Revistar) VeiculoPolicial = {} function salvacarro (vei, assento, vitima) VeiculoPolicial[source] = vei end addEventHandler ('onPlayerVehicleEnter', root, salvacarro) function ColocarNaViatura (source) local Jogador = getElementData(source, "TS:Abordando") if Jogador then local cx, cy, cz = getElementPosition ( Jogador ) local px, py, pz = getElementPosition ( source ) local distancia = getDistanceBetweenPoints3D ( cx, cy, cz, px, py, pz ) if distancia >= 2 then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffChegue mais perto do jogador !", "info") return end local viatura = VeiculoPolicial[source] if VeiculoPolicial[source] then triggerClientEvent(Jogador, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffO policial te colocou na viatura !", "info") attachElements (Jogador, viatura, 0.2, -1.5, 0, 0,0,90) setPedAnimation(Jogador, "ped", "CAR_dead_LHS", false, false) local RotVX, RotVY, RotVZ = getElementRotation(viatura) setElementRotation(Jogador, RotVX, RotVY, RotVZ + 65) end end end addEvent ( "TS:ColocarNaViatura", true ) addEventHandler ( "TS:ColocarNaViatura", root, ColocarNaViatura) function RemoverNaViatura (source) local Jogador = getElementData( source,"TS:Abordando") if Jogador then local cx, cy, cz = getElementPosition ( Jogador ) local px, py, pz = getElementPosition ( source ) local distancia = getDistanceBetweenPoints3D ( cx, cy, cz, px, py, pz ) if distancia >= 2 then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffChegue mais perto do jogador !", "info") return end local viatura = VeiculoPolicial[source] if VeiculoPolicial[source] then triggerClientEvent(Jogador, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffO policial te removeu da viatura !", "info") detachElements (Jogador, viatura) setPedAnimation(Jogador,nil) local PosX, PosY, PosZ = getElementPosition(Jogador) setElementPosition(Jogador, PosX, PosY, PosZ + 2) end end end addEvent ( "TS:RemoverNaViatura", true ) addEventHandler ( "TS:RemoverNaViatura", root, RemoverNaViatura) function ApreenderArmas (source) local Jogador = getElementData( source,"TS:Abordando") if Jogador then local cx, cy, cz = getElementPosition ( Jogador ) local px, py, pz = getElementPosition ( source ) local distancia = getDistanceBetweenPoints3D ( cx, cy, cz, px, py, pz ) if distancia >= 2 then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffChegue mais perto do jogador !", "info") return end triggerClientEvent(Jogador, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffO policial removeu todas as suas armas!", "info") takeAllWeapons(Jogador) end end addEvent ( "TS:ApreenderArmas", true ) addEventHandler ( "TS:ApreenderArmas", root, ApreenderArmas) function ApreenderPorte (source) local Jogador = getElementData( source,"TS:Abordando") if Jogador then local cx, cy, cz = getElementPosition ( Jogador ) local px, py, pz = getElementPosition ( source ) local distancia = getDistanceBetweenPoints3D ( cx, cy, cz, px, py, pz ) if distancia >= 2 then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffChegue mais perto do jogador !", "info") return end if getElementData(Jogador, "TS:PorteDeArmas") == "Sim" then triggerClientEvent(Jogador, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffO policial revogou seu porte de armas!", "info") setElementData(Jogador, "TS:PorteDeArmas", nil) end end end addEvent ( "TS:ApreenderPorte", true ) addEventHandler ( "TS:ApreenderPorte", root, ApreenderPorte) function ApreenderDrogas (source) local Jogador = getElementData( source,"TS:Abordando") if Jogador then local cx, cy, cz = getElementPosition ( Jogador ) local px, py, pz = getElementPosition ( source ) local distancia = getDistanceBetweenPoints3D ( cx, cy, cz, px, py, pz ) if distancia >= 2 then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffChegue mais perto do jogador !", "info") return end triggerClientEvent(Jogador, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffO policial apreendeu suas drogas!", "info") setElementData(Jogador, "TS:Maconha", 0) setElementData(Jogador, "TS:Cocaina", 0) setElementData(Jogador, "TS:Heroina", 0) setElementData(Jogador, "TS:Crack", 0) setElementData(Jogador, "TS:LSD", 0) end end addEvent ( "TS:ApreenderDrogas", true ) addEventHandler ( "TS:ApreenderDrogas", root, ApreenderDrogas) function AlterarFicha (source, Quantidade) local Jogador = getElementData( source, "TS:Abordando") if Jogador then local cx, cy, cz = getElementPosition ( Jogador ) local px, py, pz = getElementPosition ( source ) local distancia = getDistanceBetweenPoints3D ( cx, cy, cz, px, py, pz ) if distancia >= 2 then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffChegue mais perto do jogador !", "info") return end setPlayerWantedLevel(Jogador, Quantidade) triggerClientEvent(Jogador, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffO policial alterou a sua ficha criminal!", "info") end end addEvent ( "TS:AlterarFicha", true ) addEventHandler ( "TS:AlterarFicha", root, AlterarFicha) --------------------- Não Meche 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 Por favor, ficarei muito agradecido, sou novo aqui na comunidade, se eu tiver postando em lugar errado, pode remover sem problema, desculpem qualquer coisa !
  4. Eu preciso fazer este circulo ao redor do blip, alguém pode me ajudar? https://prntscr.com/wid38f
  5. A animação de arma funciona pra mim, mas não funciona para os outros players. Para mim a arma fica posicionada frente ao ombro quando eu miro, para os demais players fica posicionada no quadríl Aparece isso no debugscript
  6. Estou fazendo um sistema de Porte de Armas + Venda de Armas. E eu quero deixar assim, só quem pode comprar arma é quem tem o porte de armas. Quem não tem, não consegue comprar as armas. Alguém que possa me ajudar?
  7. Galera, desculpe minha ignorância, mas sou leigo com shaders, olhando alguns posts aqui do fórum cheguei nesse código e finalmente consegui mudar a textura dos objetos do jeito que eu queria, só que percebi que assim eu teria que adicionar a textura já com cor por que eu não consegui mudar a cor, porém dessa maneira eu ocuparia muito espaço com imagens das texturas. Enfim como eu poderia colocar cores(r,g,b,a). Como os shaders dos veículos ? Só que no objeto de meu desejo ? Imagem 1: Imagem 2:
  8. Sou iniciante em lua e estou tentando criar um script que faça com que quando o player esteja no "ModoPassivo" e pegue um veículo, o veículo dele fique blindado, e quando ele saia do "ModoPassivo" o veículo fique normal. Acontece que simplesmente não funciona. Alguem poderia me ajudar apontando onde errei ou algo do tipo? Server: function test47 (thePlayer) if getElementData ( thePlayer, "ModoPassivo" ) == true then local theVehicle = getPedOccupiedVehicle (thePlayer) if theVehicle and isElement (theVehicle) then setVehicleDamageProof (theVehicle, true) else setVehicleDamageProof (theVehicle, false) end end end
  9. Ola pessoal, estou querendo desenvolver um sistema de empurrar um carro que esteja acabado a gasolina ou esta quebrado, para poder fazer um rp maneiro. Mas infelizmente n sei por onde começar vocês podem me dar uma ideia dos comandos para ser usados? desde ja agradeço muito.
  10. Olá pessoal do fórum, queria fazer um sistema de que quando eu clicasse no meu personagem iniciava uma função exp: abrir um painel cegui - realmente não sei por onde começar, também não quero o script pronto quero aprender e fazer do 0, quem poder me ajudar por favor agradeço desde já.
  11. Ola pessoal, gostaria de criar um script que iria remover as roupas do CJ e deixar ele normal para que a pessoa possa editar seu cj novamente. BASE: function teste( thePlayer ) removePedClothes ( thePlayer ) end addCommandHandler("pelado", teste) Ok mas como eu vou remover todas as roupas editadas e deixar a original do cj isso que eu queria saber, pois na função que esta na wiki voce pega um id de alguma roupa para retirar, desde ja agradeço.
  12. Ola pessoal, estou com um problema no painel de admin eu gostaria de remover a parte de Serial e IP do painel admin para que a minha equipe de staff n pegue nenhum ip ou sla tente fazer algo ilícito com o ip do player, eu procurei em todos os arquivos da pasta admin e n achei alguem poderia me ajuda com isso, desde já agradeço Print Painel Admin: https://imgur.com/a/sHm9dwX
  13. Gostaria de remover os comando das tecla Q e E, porque geralmente ela sempre troca a arma das mãos por outras e gostaria de retirar essa função so não sei como. fazendo com que elas não tenha nenhuma interação.
  14. -------------------------------------------------------------- -- © [2019] Varzen Advanced [2019] © -- -- © Creditos: Varzen Advanced © -- -- © Facebook: https://www.facebook.com/VarzenAdvanced © -- -- © Youtube: http://www.youtube.com/c/VarzenBR © -- -- © Blog: https://varzenadvanced.blogspot.com/ © -- -------------------------------------------------------------- addEvent("updateINTDIM2", true) addEventHandler("updateINTDIM2", getRootElement(), function (vehicleId) for index, value in ipairs (getElementsByType("vehicle")) do if getElementData(value, "ID") == tonumber(vehicleId) then if getElementData(value, "ownercar") == getElementData(source, "ID") then setElementInterior(value,0) setElementDimension(value,0) local x, y, z = getElementPosition(source) setElementPosition(value, x, y, z) warpPedIntoVehicle(source,value) end end end end ) addEvent("guardar", true) addEventHandler("guardar", getRootElement(), function (vehicleId) for index, value in ipairs (getElementsByType("vehicle")) do if getElementData(value, "ID") == tonumber(vehicleId) then if getElementData(value, "ownercar") == getElementData(source, "ID") then local gerarposicao = math.random(50,100) setElementPosition(value,1805.39368, -2448.51196, 13.44729) setElementInterior(value,gerarposicao) setElementDimension(value,gerarposicao) outputChatBox("#9ACD32[SRP] #ffffffVeículo Guardado.",source,0,0,0,true) end end end end ) addEvent("updateINTDIM22", true) addEventHandler("updateINTDIM22", getRootElement(), function (vehicleId) for index, value in ipairs (getElementsByType("vehicle")) do if getElementData(value, "ID") == tonumber(vehicleId) then if getElementData(value, "ownercar") == getElementData(source, "ID") then setElementInterior(value,0) setElementDimension(value,0) end end end end )
  15. Olá estou com problemas em meu emprego, todo mundo mesmo quem não está atrabalhando neste emprego consegue spawnar o veiculo do trabalho apenas indo até o marker, tentei por uma proteção que faça com quem tem a skin do emprego consiga pegar o carro e o destruir. porém nenhum resultado se conseguirem me ajudar agraçederia muito. local marker = createMarker(2681.17285, -1957.08862, 12.7, "cylinder", 1.0, 0, 0, 255, 255) local Dmarker = createMarker(2679.63989, -1968.49829, 12.5, "cylinder", 3.0, 255, 0, 0, 100) function enterVehicle ( player, seat, jacked ) --quando um jogador entra em um veículo policeLimpador = { [552]=true} --ID Veiculos Policiais policeLimpadorSkins = { [27]=true } --ID Skins Policiais if ( policeLimpador[getElementModel(source)] ) and ( not policeLimpadorSkins[getElementModel(player)] ) then --se o veículo é um dos 4 carros da polícia, ea pele não é uma pele polícia cancelEvent() outputChatBox ( "#ff0000Somente Motoristas podem entrar neste veiculo", player, 255, 255, 255, true ) --and tell the player why end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) --add an event handler for onVehicleStartEnter function Vehicle( thePlayer ) if getElementType(thePlayer) == "player" then local x,y,z = getElementPosition(thePlayer) veh = createVehicle(552, 2687.59, -1970.002, 13.547, -0, 0, 266.348 ) warpPedIntoVehicle(thePlayer, veh) end end addEventHandler("onMarkerHit", marker, enterVehicle) function destroy (hitElement) if getElementType(hitElement) == "Vehicle" then destroyElement(hitElement) end end addEventHandler("onMarkerHit", Dmarker, destroy)
  16. Ola pessoal, sou novo no blog mas estou fazendo um server freeroam e queria uma ajuda para colocar um limite de contas registradas por serial ja tentei algumas funções mas ate agora nada, pfv me ajudem preciso muito dessa função funcionando no painel de login codigo server: addEvent("onRequestLogin",true) addEventHandler("onRequestLogin",resourceRoot, function(username,password,checksave) if not (username == "") then if not (password == "") then local account = getAccount ( username, password ) if ( account ~= false ) then logIn(client,account,password) triggerClientEvent (client,"onClientPlayerLogin",resourceRoot) if checksave and checksave == "1" then triggerClientEvent(client,"useLoginFile",resourceRoot,"set",username,password) else triggerClientEvent(client,"useLoginFile",resourceRoot,"remove",username,password) end else triggerClientEvent(client,"setNotification",resourceRoot,"Errado Nome De Usuário Ou Senha!") end else triggerClientEvent(client,"setNotification",resourceRoot,"Por Favor, Digite Sua Senha!") end else triggerClientEvent(client,"setNotification",resourceRoot,"Digite Seu Nome De Usuário!") end end ) addEvent("onRequestRegister",true) addEventHandler("onRequestRegister",resourceRoot, function(username,password,repassword,serial) if #getAccountsBySerial(serial) == 2 then triggerClientEvent(client,"setNotification",resourceRoot,"Voce Ja Tem 2 Contas Registradas Nesse Serial!") else addAccount() if not (username == "") then if not (password == "") then if not (repassword == "") then if password == repassword then local account = getAccount (username) if (account == false) then local accountAdded = addAccount(tostring(username),tostring(password)) if (accountAdded) then logIn(client,accountAdded,password) triggerClientEvent(client,"onClientPlayerLogin",resourceRoot) triggerClientEvent(client,"useLoginFile",resourceRoot,"set",username,password) outputChatBox("*Logado Com Sucesso! ( Nome de Usuário: #ee8a11" .. username .. " #FFFFFF| Senha: #ee8a11" .. password .. "#FFFFFF )",client,255,255,255,true) else triggerClientEvent(client,"setNotification",resourceRoot,"Por Favor, Escolha Uma Conta E/Ou Senha Diferente") end else triggerClientEvent(client,"setNotification",resourceRoot,"Uma Conta Com Esse Nome De Usuario Ja Existe!") end else triggerClientEvent(client,"setNotification",resourceRoot,"As Senhas Não Coincidem!") end else triggerClientEvent(client,"setNotification",resourceRoot,"Por Favor, Confirme Sua Senha!") end else triggerClientEvent(client,"setNotification",resourceRoot,"Por Favor, Insira Uma Senha Para Criar Sua Nova Conta!") end else triggerClientEvent(client,"setNotification",resourceRoot,"Por Favor, Insira Um Nome De Usuario Para Criar Sua Conta!") end end end ) Erro dado no console: https://imgur.com/a/JlBwzt9 PFV ME AJUDEM ESTOU CRIANDO UM SERVER DE FREEROAM!
  17. Ola pessoal, então eu ativei um radar aki que tenho configurado para meu servidor, mas esta aparecendo o radar do mta nativo ( O do GTA:SA) e o Radar modificado que eu coloquei alguem me ajuda por favor pra deixar somente o modificado ligado. Link Erro: https://prnt.sc/udxm62
  18. ola pessoal, andei pesquisando e tentando fazer um script que quando eu der /stats ele aparecera as mortes as kills e o KD(ratio) mais por algum motivo n sei pq esta dando errado olhem os codigos e pfv me ajudem com isso. Codigo server: function chat( sourcePlayer, commandName, targetPlayerName ) if ( thePlayer ) then local kills = getPlayerKills( getLocalPlayer() ) local deaths = getPlayerDeaths( getLocalPlayer() ) outputChatBox ( "O Player"..getPlayerName(player).."Tem"..kills.."/"..deaths"", root, 255, 255, 255, true ) end end addCommandHandler("stats", chat) Codigo Client: function kills() setElementData ( getLocalPlayer ( ), "kills", 0 ) end addEventHandler ( "onClientResourceStart", resourceRoot, kills ) o KD(ratio) n testei por enquanto mais se vcs quiserem ja colocar pra me ajudar eu ficaria muito grato OBS: Nao deu nenhum erro mais tambem n apareceu no chat quando eu digitava /stats
  19. Ola pessoal meu sistema de radar esta dando o aviso de função deprecated não sei oque é isso pois sou novo no .lua, mas se alguem conseguir me explicar e me ajudar a resolver fico grato:) Codigo Erro 1: local states={ ["radar_zoom_in"]=false, ["radar_zoom_out"]=false, ["radar_move_north"]=false, ["radar_move_south"]=false, ["radar_move_east"]=false, ["radar_move_west"]=false, } local mta_getControlState = getControlState function getControlState(control) local state=states[control] if state==nil then return mta_getControlState(control) else return state end end local function handleStateChange(key,state,control) states[control]=(state=="down") end for control,state in pairs(states) do for key,states in pairs(getBoundKeys(control)) do bindKey(key,"both",handleStateChange,control) end end Codigo Erro 2: function checkMovement() -- Zoom if getControlState("radar_zoom_in") and zoom<maxZoomLimit then zoom=zoom+zoomRate if zoom>maxZoomLimit then zoom=maxZoomLimit end elseif getControlState("radar_zoom_out") and zoom>minZoomLimit then zoom=zoom-zoomRate if zoom<minZoomLimit then zoom=minZoomLimit end zoomOutRecalculate() end -- Move if getControlState("radar_move_north") then local newY=y-yOffset*zoom+(yOffset+movementSpeed)*zoom if newY<0 then yOffset=yOffset+movementSpeed end end if getControlState("radar_move_south") then local newY=y-yOffset*zoom+(yOffset-movementSpeed)*zoom if newY>(-vSize+screenH) then yOffset=yOffset-movementSpeed end end if getControlState("radar_move_west") then local newXOff=(xOffset+movementSpeed) local newX=x-xOffset*zoom+newXOff*zoom if newX<0 then xOffset=xOffset+movementSpeed end end if getControlState("radar_move_east") then local newX=x-xOffset*zoom+(xOffset-movementSpeed)*zoom if newX>(-hSize+screenW) then xOffset=xOffset-movementSpeed end end end addEvent("onClientPlayerMapHide") addEvent("onClientPlayerMapShow") Erro: https://prnt.sc/uca2gd essas 2 funções esta dando deprecated pfv alguem me ajude.
  20. Eu estou fazendo meu servidor, esta quase tudo pronto. so que o toda vez que eu relogo eu dou spawn no ponto de registro, que é na prefeitura, e ele reseta as contas, ate o dinheiro local que desloguei com o dinheiro: https://prnt.sc/ua7t4n quando eu reconecto: https://prnt.sc/ua7skl eu ja mudei o play.zip e tentei tudo que eu conhecia e nada resolveu
  21. Bom, como eu desativei o modo play, o player novo, quando loga pela primeira vez, ele nasce em baixo da terra bugado (porque provavelmente não tem spawn setado pra ele) Então eu gostaria que alguém me ajudasse a resolver esse problema, se alguém tem algum script que possa resolver este problema Quem puder ajudar ficarei muito grato!
  22. Bom, quando eu coloco o código para mudar a cor no dx message, ele não muda, ele só aparece o código gostaria se tem como resolver isso, print do erro: https://prnt.sc/u4hc8k Script do DX MESSAGES: local displayWidth, displayHeight = guiGetScreenSize(); local notificationData = {}; local notificationFont = dxCreateFont('font/roboto.ttf', 12 * 2, false); local iconsFont = dxCreateFont('font/icons.ttf', 12 * 2, false); addEventHandler('onClientRender', root, function() for k, v in pairs(notificationData) do if (v.State == 'fadeIn') then local alphaProgress = (getTickCount() - v.AlphaTick) / 650; local alphaAnimation = interpolateBetween(0, 0, 0, 255, 0, 0, alphaProgress, 'Linear'); if (alphaAnimation) then v.Alpha = alphaAnimation; else v.Alpha = 255; end if (alphaProgress > 1) then v.Tick = getTickCount(); v.State = 'openTile'; end elseif (v.State == 'fadeOut') then local alphaProgress = (getTickCount() - v.AlphaTick) / 650; local alphaAnimation = interpolateBetween(255, 0, 0, 0, 0, 0, alphaProgress, 'Linear'); if (alphaAnimation) then v.Alpha = alphaAnimation; else v.Alpha = 0; end if (alphaProgress > 1) then notificationData = {}; end elseif (v.State == 'openTile') then local tileProgress = (getTickCount() - v.Tick) / 350; local tilePosition = interpolateBetween(v.StartX, 0, 0, v.EndX, 0, 0, tileProgress, 'Linear'); local tileWidth = interpolateBetween(0, 0, 0, v.Width, 0, 0, tileProgress, 'Linear'); if (tilePosition and tileWidth) then v.CurrentX = tilePosition; v.CurrentWidth = tileWidth; else v.CurrentX = v.EndX; v.CurrentWidth = v.Width; end if (tileProgress > 1) then v.State = 'fixTile'; setTimer(function() v.Tick = getTickCount(); v.State = 'closeTile'; end, string.len(v.Text) * 45 + 5000, 1); end elseif (v.State == 'closeTile') then local tileProgress = (getTickCount() - v.Tick) / 350; local tilePosition = interpolateBetween(v.EndX, 0, 0, v.StartX, 0, 0, tileProgress, 'Linear'); local tileWidth = interpolateBetween(v.Width, 0, 0, 0, 0, 0, tileProgress, 'Linear'); if (tilePosition and tileWidth) then v.CurrentX = tilePosition; v.CurrentWidth = tileWidth; else v.CurrentX = v.StartX; v.CurrentWidth = 0; end if (tileProgress > 1) then v.AlphaTick = getTickCount(); v.State = 'fadeOut'; end elseif (v.State == 'fixTile') then v.Alpha = 255; v.CurrentX = v.EndX; v.CurrentWidth = v.Width; end roundedRectangle(v.CurrentX, 20, 25 + v.CurrentWidth, 25, tocolor(0, 0, 0, 150 * v.Alpha / 255), _, true); dxDrawRectangle(v.CurrentX, 20, 25, 25, tocolor(0, 0, 0, 255 * v.Alpha / 255), true); if (v.Alpha == 255) then dxDrawText(v.Text, v.CurrentX + 25 + 10, 20, v.CurrentX + 25 + 10 + v.CurrentWidth - 20, 20 + 25, tocolor(255, 255, 255, 255), 0.40, notificationFont, 'center', 'center', false, false, true); end if (v.Type == 'error') then dxDrawText('', v.CurrentX + 5, 20, v.CurrentX + 5 + 25 - 10, 20 + 25, tocolor(215, 90, 90, v.Alpha), 0.50, iconsFont, 'center', 'center', false, false, true); elseif (v.Type == 'warning') then dxDrawText('', v.CurrentX + 5, 20, v.CurrentX + 5 + 25 - 10, 20 + 25, tocolor(220, 180, 80, v.Alpha), 0.50, iconsFont, 'center', 'center', false, false, true); elseif (v.Type == 'info') then dxDrawText('', v.CurrentX + 5, 20, v.CurrentX + 5 + 25 - 10, 20 + 25, tocolor(85, 180, 245, v.Alpha), 0.50, iconsFont, 'center', 'center', false, false, true); elseif (v.Type == 'success') then dxDrawText('', v.CurrentX + 5, 20, v.CurrentX + 5 + 25 - 10, 20 + 25, tocolor(235, 154, 13, v.Alpha), 0.50, iconsFont, 'center', 'center', false, false, true); end end end ) addEvent('addNotification', true); function addNotification(text, type) if (text and type) then if (notificationData ~= nil) then table.remove(notificationData, #notificationData); end table.insert(notificationData, { StartX = (displayWidth / 2) - (25 / 2), EndX = (displayWidth / 2) - ((dxGetTextWidth(text, 0.40, notificationFont) + 20 + 25) / 2), Text = text, Width = dxGetTextWidth(text, 0.40, notificationFont) + 20, Alpha = 0, State = 'fadeIn', Tick = 0, AlphaTick = getTickCount(), CurrentX = (displayWidth / 2) - (25 / 2), CurrentWidth = 0, Type = type or 'info' } ); playSoundFrontEnd(11); end end addEventHandler('addNotification', root, addNotification); function roundedRectangle(x, y, w, h, borderColor, bgColor, postGUI) if (x and y and w and h) then if (not borderColor) then borderColor = tocolor(0, 0, 0, 200); end if (not bgColor) then bgColor = borderColor; end dxDrawRectangle(x, y, w, h, bgColor, postGUI); dxDrawRectangle(x + 2, y - 1, w - 4, 1, borderColor, postGUI); dxDrawRectangle(x + 2, y + h, w - 4, 1, borderColor, postGUI); dxDrawRectangle(x - 1, y + 2, 1, h - 4, borderColor, postGUI); dxDrawRectangle(x + w, y + 2, 1, h - 4, borderColor, postGUI); end end
  23. Bom, se alguém puder me ajudar neste problema, gostaria muito. Ele se resume em, quando um jogador entra no servidor e é redirecionado a tela de login, ele consegue apertar F1, F2, F3 e ai vai. Gostaria de retirar isso, alguém poderia ajudar?
×
×
  • Create New...