01.06.2015, 13:39
For some reason I've found that OnVehicleDeath isn't being called the first time a vehicle dies in my server. Every other time after that it does call. Keep in mind the means of death is water.
Here's the code, although idk if it is relevant.
Here's the code, although idk if it is relevant.
pawn Код:
public OnVehicleDeath(vehicleid, killerid)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
new playerveh = GetPlayerVehicleID(i);
if(vehicleid == playerveh)
{
SetPlayerHealth(i, -1.0);
break;
}
}
DestroyVehicle(vehicleid);
return 1;
}