Hero192 Posted February 8, 2016 Posted February 8, 2016 Does this event still exist? onPlayerSpawnVehicle
Tomas Posted February 8, 2016 Posted February 8, 2016 It doesn't and didn't exist... Maybe it's an event from a certain resource? Currently developing for International Gaming Community - Join us!
Hero192 Posted February 8, 2016 Author Posted February 8, 2016 No, I am just searching for a event when a player spawn a new vehicle ? is there's any event
Dealman Posted February 8, 2016 Posted February 8, 2016 Vehicles are created via using createVehicle. You would need to create this event yourself, for example you can do it like this; function ExampleCode() local theVehicle = createVehicle(...) if(theVehicle) then triggerEvent("onPlayerSpawnVehicle", root, argument1, argument2) -- You can pass for example the player that spawned it, the vehicle id and so on. end end function onPlayerSpawnVehicle_Handler(arg1, arg2) -- Code to be executed when a vehicle is spawned end addEvent("onPlayerSpawnVehicle", true) addEventHandler("onPlayerSpawnVehicle", root, onPlayerSpawnVehicle_Handler) If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.
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