#DeltaSCR Posted December 6, 2018 Share Posted December 6, 2018 Então galera, me ajudem na seguinte situação: Estou criando um marker com teleport pra interior, mas não quero que o player seja teleportado estando em um veiculo, o que eu devo usar para bloquear isso? Link to comment
Other Languages Moderators Lord Henry Posted December 7, 2018 Other Languages Moderators Share Posted December 7, 2018 (edited) Verifique se o jogador que colidiu no marker está em um veículo usando a função getPlayerOccupiedVehicle. Se estiver, a função não deve funcionar. Edited December 7, 2018 by Lord Henry Link to comment
#DeltaSCR Posted December 7, 2018 Author Share Posted December 7, 2018 53 minutes ago, Lord Henry said: Verifique se o jogador que colidiu no marker está em um veículo usando a função getPlayerOccupiedVehicle. Se estiver, a função não deve funcionar. Então como eu deveria colocar na função do onMarkerHit? Link to comment
Other Languages Moderators Lord Henry Posted December 7, 2018 Other Languages Moderators Share Posted December 7, 2018 Mostre a função. Link to comment
#DeltaSCR Posted December 7, 2018 Author Share Posted December 7, 2018 20 minutes ago, Lord Henry said: Mostre a função. function entrar (source) setElementPosition (source, 388.208984375, 173.7236328125, 1008.3828125) setElementInterior (source, 3) setElementDimension (source, 21) setElementRotation (source, 0, 0, 90) end addEventHandler ("onMarkerHit", entrada, entrar) Link to comment
Other Languages Moderators Lord Henry Posted December 7, 2018 Other Languages Moderators Share Posted December 7, 2018 function entrar (source) if getElementType (source) == "player" and not getPedOccupiedVehicle (source) then -- Se o elemento que colidiu no marker for um player e ele estiver a pé, então: setElementPosition (source, 388.208984375, 173.7236328125, 1008.3828125) setElementInterior (source, 3) setElementDimension (source, 21) setElementRotation (source, 0, 0, 90) end end addEventHandler ("onMarkerHit", entrada, entrar) Link to comment
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