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 ) Giving a Fuck? Nope, That isn't in My Skill Set
iMr.3a[Z]eF Posted July 28, 2013 Posted July 28, 2013 What the event you used for this function? To Visit Us Press Here: mtasa://5.9.206.180:22002
K4stic Posted July 28, 2013 Author Posted July 28, 2013 it do that then openning gui Giving a Fuck? Nope, That isn't in My Skill Set
Moderators IIYAMA Posted July 28, 2013 Moderators Posted July 28, 2013 may I ask, what will getVehicleType return? instead of "Automobile" Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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 Sometimes I dream about cheese
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