29.05.2013, 22:23
how do i create this so if you crash into a wall / tree ect with a vehicle and you dont have a /sb it will go down.
new seatbelt[MAX_PLAYERS];
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
if(seatbelt[playerid] == 0)
{
SetPlayerHealth(playerid,20);
SendClientMessage(playerid,-1,"wear a seatbelt!! /belt");
}
return 1;
}
CMD:belt(playerid,params[])
{
if(seatbelt[playerid] == 1)
{
seatbelt[playerid] = 0;
SendClientMessage(playerid,-1,"Seatbelt off");
}
else if(seatbelt[playerid] == 0)
{
seatbelt[playerid] = 1;
SendClientMessage(playerid,-1,"Seatbelt on");
}
return 1;
}