OnVehicleDamageStatusUpdate
#1

Does OnVehicleDamageStatusUpdate(vehicleid, playerid) only returns the id of the player who's driver of some vehicle or it gives and passangers id? I mean like if I was passanger when this callback was called will it return my ID?
pawn Код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
    if(Seatbelt[playerid] == 0)
    {
        GetVehicleHealth(vehicleid, vehhealthup[playerid]);
        new Float:health;
        GetPlayerHealth(playerid,health);
        health = health - ((vehhealth[playerid] - vehhealthup[playerid])/10);
        SetPlayerHealth(playerid, health);
        GetVehicleHealth(vehicleid, vehhealth[playerid]);
    }
    else if(Seatbelt[playerid] == 1)
    {
        new str[128];
        GetPlayerName(playerid, str, sizeof(str));
        format(str, sizeof(str), "* Gelbsti saugos dirzai (( %s ))", str);
        ProxDetector(10.0, playerid, str, COLOR_PINK,COLOR_PINK,COLOR_PINK,COLOR_PINK,COLOR_PINK);
    }
    return 1;
}
I made seatbelts, but it only takes effect if you sit as a driver, not passanger.

P.S. sorry for gramma.
Reply
#2

Use the function GetPlayerSeatID for Get the seat id of player.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)