OnVehicleDeath - Doesn't call the first time
#1

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.

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;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)