OnVehicleDeath - 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: OnVehicleDeath (
/showthread.php?tid=365505)
OnVehicleDeath -
Visio - 03.08.2012
how can i count OnVehicleDeath?
i have a personal vehicle system and when a vehicle death i would like to create a TD
every time when a car deth create a TD.
that is my script and what i edit
Re: OnVehicleDeath -
Visio - 03.08.2012
nobody can help me?
Re: OnVehicleDeath -
Visio - 03.08.2012
bump
Re: OnVehicleDeath -
[KHK]Khalid - 03.08.2012
pawn Код:
new countDeadVehicles;
public OnVehicleDeath(vehicleid, killerid)
{
countDeadVehicles ++;
return 1;
}
This will add 1 to countDeadVehicles everytime a vehicle dies and you can show that in a td by using
TextDrawSetString.
Re: OnVehicleDeath -
Visio - 03.08.2012
thanks is working but when the car dead is count +1 for all plyer not only for person to whom the car died
Re: OnVehicleDeath -
[KHK]Khalid - 03.08.2012
Then turn it into a per-player variable:
pawn Код:
new countDeadVehicles[MAX_PLAYERS];
public OnVehicleDeath(vehicleid, killerid)
{
countDeadVehicles[killerid] ++;
return 1;
}
Will increase it for killerid.
Re: OnVehicleDeath -
Visio - 03.08.2012
remained just as
look into my script please.