how destroy cars? +rep - 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)
+--- Thread: how destroy cars? +rep (
/showthread.php?tid=332362)
how destroy cars? +rep -
PawnoQ - 07.04.2012
hi,
i cant destroy the cars i spawned with createvehicle.
Wheres the bug?
They just arent destroyed...
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
Vehicle[i]=CreateVehicle(VehicleID,CarPos1[i][0],CarPos1[i][1],CarPos1[i][2],CarPos1[i][4],-1,-1,20);
}
public OnVehicleDeath(vehicleid, killerid)
{
DestroyVehicle(RWVehicle[vehicleid]);
return 1;
}
foreach(Player,i)DestroyVehicle(RWVehicle[i]);
Re: how destroy cars? +rep -
.FuneraL. - 07.04.2012
You created the new RWVehicle?
Re: how destroy cars? +rep -
Ronaldo_raul™ - 07.04.2012
pawn Код:
public OnVehicleDeath(vehicleid, killerid )
{
foreach(player, i )
{
DestroyVehicle(Vehicle[i]);
}
return 1;
}
Not tested. In a hurry. Its 4 : 55 AM and i haven't slept 0,0.
Re: how destroy cars? +rep -
PawnoQ - 07.04.2012
thx so far but the main question has not been answered yet...
How could i destroy all the vehicles stored in the array RWVehicle[MAX_PLAYERS] using a loop?
Re: how destroy cars? +rep -
[DOG]irinel1996 - 07.04.2012
I didn't test this, I'm not home right now:
pawn Код:
for(new v = 0; v < sizeof(RWVehicle); v++)
{
DestroyVehicle(RWVehicle[v]);
}