Jump to content

[AJUDA] Ver se o jogador esta em um carro


Recommended Posts

getPedOccupiedVehicle ( ped thePed )
  • local veh  = getPedOccupiedVehicle (thePed) --/> Verificar se o Player Esta em Veiculo.
  • if veh then return end --/> Retorna.

 

Exemplo :

function teleporte ( source )
   local veh  = getPedOccupiedVehicle (source)
   if veh then ouputChatBox("Você So Pode usa Este Comando Fora do Veiculo", source,255,255,255,true) return end
   setElementPosition(source, 0,0,0)
end
addCommandHandler("tp", teleporte)

 

Edited by Angelo Pereira
Link to comment
31 minutes ago, Angelo Pereira said:

getPedOccupiedVehicle ( ped thePed )
  • local veh  = getPedOccupiedVehicle (thePed) --/> Verificar se o Player Esta em Veiculo.
  • if veh then return end --/> Retorna.

 

Exemplo :


function teleporte ( source )
   local veh  = getPedOccupiedVehicle (source)
   if veh then ouputChatBox("Você So Pode usa Este Comando Fora do Veiculo", source,255,255,255,true) return end
   setElementPosition(source, 0,0,0)
end
addCommandHandler("tp", teleporte)

 

Muito obrigado.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...