Destroy Vehicle Problem
#4

yes, Mike already told you everything you need:
new IsASpawnedCar[MAX_VEHICLES]; belongs into the cars-filterscript. this array is only known to this car-filterscript, despite that its sharing all vehicle ids with the gamemode indeed. as soon the filterscript creates a car (CreateVehicle), let it set the
Код:
//your CreateVehicle(blablablab);
variable IsASpawnedCar[vehicleid] = 1;
...just add that line below your CreateVehicle() line, so the filterscript will know that that car got spawned by itself.
in your OnPlayerExitVehicle(playerid,vehicleid) callback, add the check if the car, is one of the filterscripts spawned cars. the gamemode wont see the "set to 1" variable, so that check
Код:
if(IsASpawnedCar[vehicleid])
{
//your DestroyVehicle(vehicleid);
}
will return 0 for any gamemode created cars. it will return 1 in the filterscripts cars, so you can destroy it then.
ah, maybe you need to GetPlayerVehicleID(playerid) first, but i presume you already know that
Reply


Messages In This Thread
Destroy Vehicle Problem - by RowdyrideR - 06.07.2011, 14:15
Re: Destroy Vehicle Problem - by Mike Garber - 06.07.2011, 14:31
Re: Destroy Vehicle Problem - by RowdyrideR - 06.07.2011, 14:40
Re: Destroy Vehicle Problem - by Babul - 06.07.2011, 15:51

Forum Jump:


Users browsing this thread: 2 Guest(s)