#Hungria Posted July 21, 2017 Posted July 21, 2017 Alguem Pode Me Ajudar ? function AirNewQuit (source) if (veh[source]) and isElement(veh[source]) then setElementVisibleTo ( AirNew77744, source, false ) destroyElement (veh[source]) outputChatBox ("#ffffff[ #FFA136Trabalho #ffffff] - #FFFFFFVoce Saiu Do Veiculo E Perdeu O Emprego", source ,0,0,0,true) else end end addEventHandler ( "onVehicleExit", getRootElement(), AirNewQuit ) --- Quando O Jogador Sai Do Veiculo ( Funcionando ) addEventHandler ( "onPlayerWasted", getRootElement(), AirNewQuit ) --- Quando O Jogador Morre ( Nao Funciona ) addEventHandler ( "onPlayerQuit", getRootElement(), AirNewQuit ) --- Quando O Jogador Quita Do Servidor ( Nao Funciona ) Queria Saber Porque As Duas Ultimas Linhas Nao Funcionam, Se Alguem Puder Me Ajudar Ficaria AGRADECIDO.
Moderators Lord Henry Posted July 21, 2017 Moderators Posted July 21, 2017 (edited) Por favor, utilize o botão de código < > para postar seu script. Não esqueça de deixar ele com os espaçamentos corretos (indentação) para ajudar na leitura. Exemplo: function indentado () return true end addCommandHandler ("lua", indentado) function naoIndentado () return false end addCommandHandler ("lua", naoIndentado) Edited July 21, 2017 by Lord Henry Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment Discord Oficial do MTA: https://mtasa.com/discord Blacklist e Whitelist de Scripters: Planilha Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.
DNL291 Posted July 22, 2017 Posted July 22, 2017 Parâmetros do evento onPlayerQuit: [string] quitType, [string] reason, [element] responsibleElement E onPlayerWasted: [int] totalAmmo, [element] killer, [int] killerWeapon, [int] bodypart, [bool] stealth Tá aí o motivo de não funcionar nesses 2 - o primeiro parâmetro de ambos não é o jogador. Tire source do parâmetro e para o onVehicleExit você pode usar a variável predefinida 'eventName'. Please do not PM me with scripting related question nor support, use the forums instead.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now