10.10.2011, 18:26
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?
I made seatbelts, but it only takes effect if you sit as a driver, not passanger.
P.S. sorry for gramma.
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;
}
P.S. sorry for gramma.