K4stic Posted July 28, 2013 Share 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 ) Link to comment
iMr.3a[Z]eF Posted July 28, 2013 Share Posted July 28, 2013 What the event you used for this function? Link to comment
K4stic Posted July 28, 2013 Author Share Posted July 28, 2013 it do that then openning gui Link to comment
Moderators IIYAMA Posted July 28, 2013 Moderators Share Posted July 28, 2013 may I ask, what will getVehicleType return? instead of "Automobile" Link to comment
denny199 Posted July 28, 2013 Share 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 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