03.03.2012, 16:39
Hey Everyone, I just made this code to make a player not able to exit a vehicle which are locked or either wearing a seatbelt.
It works perfekt if you are not the driver, but if you are the driver the player are still able to exit the vehicle but the text appers if you are wearing a seatbelt. I've tested alot of stuff, like if the player are a driver which is Seat ID 0 did as well not help to put the player back inside, but the text still appears.
Anyone have any suggestions what the problem might be? or if it's a SA:MP bug?
It works perfekt if you are not the driver, but if you are the driver the player are still able to exit the vehicle but the text appers if you are wearing a seatbelt. I've tested alot of stuff, like if the player are a driver which is Seat ID 0 did as well not help to put the player back inside, but the text still appears.
Anyone have any suggestions what the problem might be? or if it's a SA:MP bug?
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(Seatbelt[playerid] == 1)
{
new Seat = GetPlayerVehicleSeat(playerid);
PutPlayerInVehicle(playerid, vehicleid, Seat);
SendClientMessage(playerid, COLOR_GRAD1," It's kind of hard to exit your vehicle with your seatbelt on, try unbuckle your seatbelt first!");
return 1;
}
if(CarInfo[vehicleid][cLock] == 1 || gCarLock[vehicleid] == 1)
{
new Seat = GetPlayerVehicleSeat(playerid);
PutPlayerInVehicle(playerid, vehicleid, Seat);
return 1;
}
return 1;
}