Seatbelt question
#6

Quote:
Originally Posted by Qur
Посмотреть сообщение
I've put it at OnPlayerExitVehicle..
but right now when the player is exit the car with the seatbelt on him it saying that line "you must take your seatbelt .......... " but he's not in the vehicle.. he can go out..
Sorry about that, try this:

pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
    if(seatbelt[playerid])
    {
        new Float:x, Float:y, Float:z;
        SetPVarInt(playerid, "VehicleExited", vehicleid);
        SetPVarInt(playerid, "VehicleSeat", GetPlayerVehicleSeat(playerid));
        GetPlayerPos(playerid, x, y, z);
        SetPlayerPos(playerid, x, y, z);
        SetTimerEx("EnterBack", 600, false, "i", playerid);
        SendClientMessage(playerid, 0xAFAFAFAA, "    You must take your seatbelt off first! (/seatbelt)");
    }
    return 1;
}

forward EnterBack(playerid);
public EnterBack(playerid)
{
    PutPlayerInVehicle(playerid, GetPVarInt(playerid, "VehicleExited"), GetPVarInt(playerid, "VehicleSeat"));
    DeletePVar(playerid, "VehicleExited");
    return DeletePVar(playerid, "VehicleSeat");
}
Reply


Messages In This Thread
Seatbelt question - by Qur - 28.11.2011, 07:57
Re: Seatbelt question - by Emmet_ - 28.11.2011, 08:00
Re: Seatbelt question - by Qur - 28.11.2011, 10:02
Re: Seatbelt question - by Aira - 28.11.2011, 10:15
Re: Seatbelt question - by System64 - 28.11.2011, 10:15
Re: Seatbelt question - by Emmet_ - 28.11.2011, 10:16
Re: Seatbelt question - by Qur - 28.11.2011, 10:26
Re: Seatbelt question - by Emmet_ - 28.11.2011, 10:38
Re: Seatbelt question - by Egyptian Trooper - 28.11.2011, 10:52
Re: Seatbelt question - by Qur - 28.11.2011, 11:03

Forum Jump:


Users browsing this thread: 5 Guest(s)