Jump to content

\\Virus//

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by \\Virus//

  1. Olá, Estou Aqui para Apresentar Meu Novo e Primeiro Projeto de um Servidor Roleplay, Só que Sem a Chatice do Pique pega entre Policia e Ladrão, No Meu Servidor Terá Profissões Variadas (Até Agora Possuímos: Caminhoneiros, Mecânico, Mineradores, Paramédicos[Em Progresso], Piloto, Policia[Em Progresso] e Piloto Paramédico[Em Progresso].) Temos também um Sistema de Tuning único e Variado (Já que não usamos Veículos Modificados, o que Implica na leveza do Server e Também do Cliente!) Além Da Cidade SART City!, (é surpresa...) Estamos Desenvolvendo e Evoluindo o Servidor Cada Dia Mais! Por Enquanto Está em Fase Beta de Desenvolvimento, Mas Caso Queira ter a Chance de Experimentar o Server Basta Entrar em Nosso Server do Discord! Nos Encontramos Lá! [SART]//Virus~ [Brasil SART City] - Discord
  2. Isso é Um Exemplo de como você pode fazer isso, já que não significa que o cara que fez o mod da concessionária colocou o ElementData com a Chave ID. --supondo que o cara comprou o carro e o " ElementData " do Carro é o id do player com a chave ID. -- Ficaria assim na concessionária: setElementData([veiculo],"ID",id) -- "[id] é o id do player" --ai pra mandar a msg function mandarmsg(veh) local id = getElementData(veh,"ID") if id then local acc = getAccountByID(id) local player = getAccountPlayer(acc) outputChatBox("#FFFF00[DESMANCHE] #FFFFFFO OH NÃO SEU CARRO FOI DESTRUIDO! .. ;-; .",player,r,g,b,true) end end addEvent("msg",false) -- se a função tiver no mesmo script do desmanche deixe como false, senão bota como true. [true ativa o trigger remoto] addEventHandler("msg",root,mandarmsg) --- Isso é um Exemplo!!!!!!!!, já que sem o script que seta a Info no carro eu não tenho como adivinhar qual chave o cara usou, eu usei aqui a Chave ID pra dar uma idéia de como seria.
  3. É vrdd, desculpa, eu n prestei atenção nessa parte quando fui colocar o script aqui, eu tinha colocado o limite de 59 min mas esqueci que as horas só vao ate 23 e n 24, foi um vacilo msm, coisa de principiante nos proximos eu vo me esforçar mais pra n deixar passar esses erros bobos ?
  4. Bom, Não sei se era exatamente isso que você queria, mas fiz um script que você muda seu horário sem interferir no servidor. o script é client side, só basta fazer um meta.xml para ele. Obs: caso não saiba criar um meta.xml eu vou deixar aqui em baixo o que você precisa fazer para rodar o script em seu server! o Script Possui dois comandos, um para setar a hora e outro para congelar o tempo formatos: horas: (/hora [horas] [minutos]) congelar tempo: (/congelar) Script: --//Comando Para Setar as Horas e Minutos\\-- function setarTempo(cmd,horas,minutos) if horas then if type(tonumber(horas)) == "number" then if tonumber(horas) <= 24 and tonumber(horas) >= 0 then if (not minutos) or tonumber(minutos) <= 59 and tonumber(minutos) >= 0 then if #horas > 0 then if minutos then setTime(horas,minutos) outputChatBox("#00FF00Horário Setado Para: #FFFFFF"..horas.." #00FF00Horas e #FFFFFF"..minutos.." #00FF00Minutos!",r,g,b,true) else setTime(horas,00) outputChatBox("#00FF00Horário Setado Para: #FFFFFF"..horas.."#00FF00 :#FFFFFF 00 #00FF00! Para Mais Precisão Use /hora [horas] [minutos]",r,g,b,true) end else outputChatBox("#00FF00Erro!, Você Não Digitou as Horas ou Não Foram Setadas!",r,g,b,true) end else outputChatBox("#FF0000Erro!, O Valor Máximo para os Minutos é 59, e minimo é 0",r,g,b,true) end else outputChatBox("#FF0000Erro!, O Valor Máximo para os Minutos é 24, e minimo é 0",r,g,b,true) end else outputChatBox("#00FF00Erro!, Somente Números São Aceitos!",r,g,b,true) end else outputChatBox("#FF0000Comando Inválido!, Formato: /hora [horas] [minutos]",r,g,b,true) end end addCommandHandler("hora",setarTempo,false,false,horas,minutos) --\\Comando Para Setar as Horas e Minutos//-- --//Congela o Tempo Por Comando\\-- local congelado = 0 function congelarTempo() if congelado == 0 then setMinuteDuration(1000000000) -- Equivale a 11 Dias, eu fiz a conta ;D congelado = 1 -- obs: eu ahco que ninguem vai fica jogando mta por 11 dias neh? else setMinuteDuration(1000) congelado = 0 end end addCommandHandler("congelar",congelarTempo,false,false) --\\Congela o Tempo por Comando//-- Bom, Aqui vai o que Você Precisa fazer caso não saiba: 1 - Crie uma pasta dentro da aba resources do seu server com o nome que quiser. Obs: não pode possuir espaço senão o server não reconhece, caso queira espaçar, use " - ou _ " 2 - Crie um arquivo .lua, Ex: meuscript.lua 3 - Abra o arquivo .lua, cole o código e salve 4 - Crie um arquivo chamado meta.xml e cole isso aqui nele: <meta> <script src="[nome do script].lua" type="client"/> </meta> Obs: os [ ] são para deixar a visualização mais fácil, no caso ficaria assim, Ex: <script src="meuscript.lua" type="client"/> 5 - após fazer os passos acima é só dar refresh no console do servidor [Caso já esteja aberto] ou inicie e procure no painel de admin pelo nome da pasta que você criou Espero ter ajudado!, qualquer coisa é só falar!
  5. bom, cheguei agr do mercado, vo da uma testada pra ver, mas mt obrigado pela ajuda mano sou mt grato por cada um que ta ajudando te adicionei no dc la mano se quiser aceitar la agradeço mt NOSAAAAAAAAAAAAAAAAAAAAAA BRIGADAO MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN ME ajudou mt msm cara seriao velhooooooooo
  6. ainda continua com o mesmo problema ;-; parece "Facil" de resolver mas fiquei cerca de quase 3 horas tentando achar esse problema e não encontrei ;-; isso antes de vir pedir ajuda aq ;-;
  7. tem como vc me adicionar no discord? eu posso te mostrar o problema ná pratica pq estou com um amigo aqui no svr
  8. bom Mt obrigado vou testar aqui e ver se funciona! não funcionou man, continua com o mesmo bug, quando alguem esta em um veiculo assim com eu e sai/entra do carro ambos os carros desligam, ele n tá agindo individualmente ;-; mas obg pela ajuda
  9. olá , bom dia/boa tarde/boa noite/ estou com um problema com o meu script de Ligar/desligar motor com os "triggerServerEvent"."o script faz com que, quando um player entra no carro ele começa desligado, e o player tem que pressionar [ i ] para ligar o veiculo,porém por algum motivo bizarro quando um player está em um veiculo e outro entra/sai de outro veiculo os dois veículos desligam e não consigo identificar o problema, por isso estou pedindo ajuda aq ;-;" Script: ----/////////------ --Lado do Cliente ----/////////------ function ligarMotor() triggerServerEvent("motor",getLocalPlayer()) end --Seta o Motor Como Desligado ao Entrar + Bind para Ligar/desligar o motor addEventHandler("onClientVehicleEnter",getRootElement(),function() outputChatBox("#FFFF00Para Ligar/Desligar o Motor Aperte [ i ]",r,g,b,true) triggerServerEvent("motor",getLocalPlayer()) bindKey("i","down",ligarMotor) ----//////--- --Seta o Motor Como Desligado ao Sair ----//////--- end) addEventHandler("onClientVehicleStartExit",getRootElement(),function() unbindKey("i","down",ligarMotor) triggerServerEvent("motor",getLocalPlayer()) triggerServerEvent("certezza",getLocalPlayer()) end) ------------------------------------------------------------------------- ----/////////------ --Lado do Server ----/////////------ ---desliga e liga o motor baseado no input do cliente local function motorToggle() local theVehicle = getPedOccupiedVehicle(source) if (getVehicleEngineState(theVehicle) == true) then setVehicleEngineState(theVehicle,false) setVehicleLightState(theVehicle,0,1) setVehicleLightState(theVehicle,1,1) setVehicleLightState(theVehicle,2,1) setVehicleLightState(theVehicle,3,1) elseif (getVehicleEngineState(theVehicle) == false) then setVehicleEngineState(theVehicle,true) setVehicleLightState(theVehicle,0,0) setVehicleLightState(theVehicle,1,0) setVehicleLightState(theVehicle,2,0) setVehicleLightState(theVehicle,3,0) end end addEvent("motor",true) addEventHandler("motor",getRootElement(),motorToggle) --///--- --dá a certeza que o motor vai desligar ao sair (mesmo se ja estiver desligado) ---///-- local function certeza() local theVehicle = getPedOccupiedVehicle(source) if (getVehicleEngineState(theVehicle) == true) then setVehicleEngineState(theVehicle,false) setVehicleLightState(theVehicle,0,1) setVehicleLightState(theVehicle,1,1) setVehicleLightState(theVehicle,2,1) setVehicleLightState(theVehicle,3,1) end end addEvent("certezza",true) addEventHandler("certezza",getRootElement(),certeza) se alguém puder me ajudar ficarei mt grato
  10. hey The_GTA, i decided to delete the userpanel mod, and make one by myself. there was no chance that i would fix the problem, as i said i dont know a lot of scripting but i will search for tutorials and do it slowly, i found a program called Visual Studio Code that has a MTA SA Lua Code extension wich helps a lot XD, but thanks again man i hope that u can help me with the scripts if i see any problem im the process
  11. i will try to figure out how to do a new command to update in the server side, and try to share the information with the saving script that i have, Thank you so much by your help, God Bless you, and if i have any problem running the code i will notify here
  12. man, now my head is broken ?, as i said in the start i only know the very basics like show a message in the screen , i will really need help in that. but, how can i share the donation information across clients, and trigger a server event?. for you can be easy to solve but for me it is an alian language ? i don't want to abuse of your generosity, so if u are busy or can't help i will understand and try to learn and solve myself, it will take a loooooong time but i think it will work i guess ? ?
  13. thank you very much man much love
  14. Hey The_GTA, Thanks for The Help, And sorry for being Dumb, the .Lua files that manage the wheel change is on the "donator" Folder "Userpanel/files/data/donator" and there have the Donator_c.Lua and the Donator_s.Lua and in the Wheels folder "Userpanel/files/data/donator/wheels", there have the wheels_c.Lua and wheels_s.Lua these .Lua files are the unique files that manage's wheel change. But i checked in another Userpanel(that is ugly as hell) the script runs an admin command to change the wheels (i dont know if scripts can do that), so everybody can see the modified wheels that is on the car, but i dont know, why the userpanel that i'm using can't do that. it change the wheels, but only for the person that is playing, the other players can't see it and i was hunting that issue by 3 days and i'm about to be Crazy by now XD and i dont know if this issue is by "design" , i won't believe it is, this has to be a bug or a script fail i dont know, i'm calling help cuz i spend too much time chasing that issue and nothing ;-;
  15. Hey! , sorry for wasting you time guys, but i'm having a problem with a mod that i downloaded for my DestructionDerby server, is a user panel, when i tested it i saw one issue, when a donator (in donator tab) choose a wheel, the other players can't see the wheel that the donator are using, even the normal ones from the game. i dont have a lot of knowledge in scripting (i only know the very basics) and i tryed to find the error by myself by 3 days, and nothing. i dont know what's happening, if you guys can help me, i will be os much gratefull. i will leave the link for download so you guys can test and see (u need another player to see the issue) https://drive.google.com/file/d/1N26FW1hBZ1ErkiAoJSrxpMIYwnXTkRRU/view?usp=sharing I Hope that you guys can help me out!
×
×
  • Create New...