Car "if" help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Car "if" help (
/showthread.php?tid=137729)
Car "if" help -
cssbart - 29.03.2010
what the if for if some one in the car it does not detele and if no some is in there then it does not delete
Re: Car "if" help -
Jay420 - 30.03.2010
Excuse me?
Re: Car "if" help -
Joe Staff - 30.03.2010
Complete shot in the dark, but...
pawn Код:
forward DeleteCars();
public DeleteCars()
{
new usedcars[MAX_VEHICLES];
for(new playerid;playerid<MAX_PLAYERS;playerid++)
{
if( IsPlayerConnected(playerid) && IsPlayerInAnyVehicle(playerid) )usedcars[GetPlayerVehicleID(playerid)-1] = 1;
}
for(new vehicleid;vehicleid<MAX_VEHICLES;playerid++)
{
if( !usedcars[vehicleid] )DestroyVehicle(vehicleid);
}
}
Re: Car "if" help -
cssbart - 30.03.2010
thanks but where would i add this
Код:
DestroyVehicle(TmpVehicle[playerid]);
if theres no one in the car
Re: Car "if" help -
cssbart - 30.03.2010
Any know where to put it please
Код:
DestroyVehicle(TmpVehicle[playerid]);
Re: Car "if" help -
[WF]Demon - 30.03.2010
i would guess put it over DEstroyVehicle(vehicleid) but i sent you one that was perfectly good for this...