OnPlayerEnterVehicle Error
#6

First of all,
OnPlayerEnterVehicle is a bad place to put this, this is called when they (attempt) to enter a vehicle, even if locked & or something else happens that prevents them from doing so(such as being killed, being teleported, etc).

OnPlayerStateChange would be a better callback for this, though you should store a variable aswell holding the objectID so you can detect if it's already been added and in future callbacks such as OnVehicleDeath destroy it.

You need to use CreateObject to create the initial object.
Reply


Messages In This Thread
OnPlayerEnterVehicle Error - by MrGtasagamer - 26.08.2015, 15:15
Re: OnPlayerEnterVehicle Error - by Zonoya - 26.08.2015, 15:21
Re: OnPlayerEnterVehicle Error - by MrGtasagamer - 26.08.2015, 15:24
Re: OnPlayerEnterVehicle Error - by Zonoya - 26.08.2015, 15:27
Re: OnPlayerEnterVehicle Error - by MrGtasagamer - 26.08.2015, 15:31
Re: OnPlayerEnterVehicle Error - by Abagail - 26.08.2015, 15:33
Re: OnPlayerEnterVehicle Error - by Zonoya - 26.08.2015, 15:36
Re: OnPlayerEnterVehicle Error - by MrGtasagamer - 26.08.2015, 15:36
Re: OnPlayerEnterVehicle Error - by Roberto80 - 26.08.2015, 17:43

Forum Jump:


Users browsing this thread: 2 Guest(s)