How do I declare the symbol "playerid" inside 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How do I declare the symbol "playerid" inside OnVehicleDeath (
/showthread.php?tid=132265)
How do I declare the symbol "playerid" inside OnVehicleDeath -
Chrham_2 - 07.03.2010
How do I declare the symbol playerid inside OnVehicleDeath
I wonder how. Thanks.
Re: How do I declare the symbol "playerid" inside OnVehicleDeath -
cessil - 07.03.2010
you'd have to link a player id to that vehicle like
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
vehiclepassenger[vehicleid] = playerid;
}
Re: How do I declare the symbol "playerid" inside OnVehicleDeath -
[HiC]TheKiller - 07.03.2010
pawn Код:
public OnVehicleDeath(vehicleid)
{
for(new playerid; playerid<MAX_PLAYERS; playerid ++)
{
if(GetPlayerVehicleID(playerid) == vehicleid)
{
//The player is in the vehicle when it dies.
}
}
return 1;
}