K4stic Posted July 28, 2013 Posted July 28, 2013 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 )
Moderators IIYAMA Posted July 28, 2013 Moderators Posted July 28, 2013 may I ask, what will getVehicleType return? instead of "Automobile"
denny199 Posted July 28, 2013 Posted July 28, 2013 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
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