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


Messages In This Thread
OnVehicleDeath - Doesn't call the first time - by Aerotactics - 01.06.2015, 13:39

Forum Jump:


Users browsing this thread: 1 Guest(s)