Jump to content

getVehicleType Problem


K4stic

Recommended Posts

for i, player in ipairs(getElementsByType("player")) do 
if ( isPedInVehicle( player ) == true ) and ( getVehicleType( source ) == "Automobile" ) then transport = "Automobile" end 
end 

getVehicleType not work :3 what wrong i do? ( not full code )

Link to comment

Guess you want to make stactics for all players who is in a boat, plane etc, tell us what you want

for i, player in ipairs(getElementsByType("player")) do 
if (isPedInVehicle(player)) then 
transport = getVehicleType( getPedOccupiedVehicle ( player ) ) 
end 
end 

if not. then try this:

for i, player in ipairs(getElementsByType("player")) do 
if (isPedInVehicle( player )) and (getVehicleType( getPedOccupiedVehicle(player)) == "Automobile" ) then  
transport = "Automobile"  
end 
end 

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...