#LasoPhaser Posted November 15, 2018 Posted November 15, 2018 Hello How do I create a function to get the car's occupants and respawn if the car was empty?
Gordon_G Posted November 15, 2018 Posted November 15, 2018 From wiki : https://wiki.multitheftauto.com/wiki/GetVehicleOccupants local counter = 0 for seat, player in pairs(getVehicleOccupants(pseudoVehicle)) do counter = counter + 1 end outputDebugString("Players in your vehicle: ".. counter) So you can use this to get how much player there are in the specified vehicle Then you can use respawnVehicle
#LasoPhaser Posted November 15, 2018 Author Posted November 15, 2018 1 hour ago, Gordon_G said: From wiki : https://wiki.multitheftauto.com/wiki/GetVehicleOccupants local counter = 0 for seat, player in pairs(getVehicleOccupants(pseudoVehicle)) do counter = counter + 1 end outputDebugString("Players in your vehicle: ".. counter) So you can use this to get how much player there are in the specified vehicle Then you can use respawnVehicle You Can Give Me The Code ?
Gordon_G Posted November 15, 2018 Posted November 15, 2018 No it's an helping script section, we are not supposed to give you full scripts
#LasoPhaser Posted November 15, 2018 Author Posted November 15, 2018 28 minutes ago, Gordon_G said: No it's an helping script section, we are not supposed to give you full scripts im a beginner scripter. plz give me a example code for learn this code
#LasoPhaser Posted November 15, 2018 Author Posted November 15, 2018 1 minute ago, Gordon_G said: That's exactly what I did ok ok ok ! finish the topic
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