HELP WITH CODE - 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: HELP WITH CODE (
/showthread.php?tid=138183)
HELP WITH CODE -
Ben147 - 31.03.2010
I want to write a code that if some car destroyed by a player 3 times
the car will been delete...
where should i will write the code in what public?
Re: HELP WITH CODE -
RSX - 31.03.2010
Код:
new VehicleDeaths[MAX_VEHICLES];
public OnVehicleDeath(blablabla);
{
VehicleDeaths[vehicleid]++;
if(VehicleDeaths[vehicleid]>=3)
{
DestroyVehicle(vehicleid,some more params maybe.. don't know)
}
}
This works if vehicle is destroyed 3 times, but it wouldn't check if 3 times is specialy from one player, that would be waste of ram, though easy possible.