SA-MP Forums Archive
DestroyVehicle like a respawner? - 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: DestroyVehicle like a respawner? (/showthread.php?tid=414979)



DestroyVehicle like a respawner? - gabyk - 11.02.2013

Hm i created a vehicle per array.
pawn Код:
DDA_CAR [ playerid ] = AddStaticVehicleEx ( 405, 347.5996, -1500, 35.9000, 128, 1, 1, 1800);
At OnVehicleDamageStatusUpdate i destroyed vehicle, but the vehicle respawn, i want to destroy
It's a possible bug ?

pawn Код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
    if ( P_INFO [ playerid ] [ DDA_D ] == 1 ) {
        // others..
        DestroyVehicle ( DDA_CAR [ playerid ] ); // Here!
        DDA_CAR [ playerid ] = -1;
    }
    return 1;
}
I don't wrong the script...


Re: DestroyVehicle like a respawner? - ryansheilds - 11.02.2013

You cannot destroy vehicles with that, you must use CreateVehicle function if you wish to destroy vehicles later.


Re: DestroyVehicle like a respawner? - gabyk - 11.02.2013

I created and with CreateVehicle and AddVehicleStaticEx.
Conclusion: DON'T WORK .