AlvesMTA Posted January 2, 2023 Posted January 2, 2023 Como posso fazer para que caso a pessoa esteja com certa ElementData ele spawne em um lugar diferente de quem não tem essa ElementData? function entrarLocal(thePlayer) if getElementType( thePlayer ) == "player" and not isPedInVehicle(thePlayer) then if source == enterpvp then setElementPosition(thePlayer, tps[aleatorio][1], tps[aleatorio][2], tps[aleatorio][3], tps[aleatorio][4] ) -- Posição de Entrada no interior setElementData(thePlayer, "pvpak", false) end end end addEventHandler("onMarkerHit", getRootElement(), entrarLocal) function teste(source) local Akkkk = getElementData( source, "pvpak" ) if source and (Akkkk) then setTimer(spawnPlayer, 7000, 1, source, 237.89525, 1396.99829, 10.58594, 0) end end addEventHandler("onPlayerWasted", root, teste)
Moderators Lord Henry Posted January 4, 2023 Moderators Posted January 4, 2023 if getElementData(thePlayer, "dataName") == "dataValue" then -- Código pra quem tem a data. else -- Código pra quem não tem a data. end 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.
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