OnVehicleDeath - player id - 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: OnVehicleDeath - player id (
/showthread.php?tid=98371)
OnVehicleDeath - player id -
Daem. - 20.09.2009
how to get player's id when he die in a vehicle?
public OnVehicleDeath(vehicleid, killerid)..?
Re: OnVehicleDeath - player id -
» sTeVe - 20.09.2009
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerInAnyVehicle(playerid))
{
//Do your things ...
}
return 1;
}
Re: OnVehicleDeath - player id -
Daem. - 20.09.2009
isn't OnPlayerExit called when OnVehicleDeath is called?
Re: OnVehicleDeath - player id -
» sTeVe - 20.09.2009
what?
Re: OnVehicleDeath - player id -
Daem. - 20.09.2009
(?)
when the vehicle dies, OnVehicleDeath(vehicleid, killerid) is called, when OnVehicleDeath(vehicleid, killerid) is called, OnPlayerExitVehicle(playerid, vehicleid) is called, (again "?", i'm not sure)
wouldn't that make "IsPlayerInAnyVehicle" useless? because the player isn't in a vehicle cause the vehicle is destroyed?
Re: OnVehicleDeath - player id -
Calgon - 20.09.2009
Killerid never returns a valid killerid. Check the bugs topic.