DestroyVehicle
#10

Quote:
Originally Posted by Betamaster
The EraseVehicle function you call is very poorly coded so I am not surprised you are having problems. You do not need the for loop (which should be limited to less then MAX_PLAYERS anyway) to get/set player positions for those in a vehicle you are destroying. You also don't need to use SetVehicleToRespawn and SetVehicleParamsForPlayerEx, and calling DestroyVehicle via the timer is not needed. Call DestroyVehicle directly and you shouldn't have a problem.
This wasn't coded by me ... it is from LAdminV4. Also you don't understand, this is just part of a larger code, however this is the part I am taking about in my 1st post. It has worked fine on 0.2x and has only appeared recently.

The SetVehicleParamsForPlayerEx (formerly SetVehicleParamsForPlayer) is there for this exact reason, when DestroyVehicle fails it locks the vehicle to anyone because cars in this system or generally admin created. If you look at LAdminV4 you'll see exactly what I mean.
Reply


Messages In This Thread
DestroyVehicle - by ded - 14.09.2009, 05:41
Re: DestroyVehicle - by ded - 14.09.2009, 21:18
Re: DestroyVehicle - by JaTochNietDan - 14.09.2009, 21:32
Re: DestroyVehicle - by shady91 - 14.09.2009, 21:39
Re: DestroyVehicle - by Jay_ - 14.09.2009, 22:43
Re: DestroyVehicle - by ded - 14.09.2009, 23:39
Re: DestroyVehicle - by dugi - 15.09.2009, 08:32
Re: DestroyVehicle - by ded - 15.09.2009, 08:51
Re: DestroyVehicle - by Betamaster - 15.09.2009, 12:02
Re: DestroyVehicle - by ded - 15.09.2009, 12:13

Forum Jump:


Users browsing this thread: 1 Guest(s)