AFK Passenger teleports vehicle to OnPause position
#1

When a player is a passenger of a vehicle. When they go afk if the driver is still driving around. If they get out their vehicle before the passenger comes back from being AFK the vehicle will be teleported to the passengers OnPause location. So I tried some code to prevent this but it didn't work.

Any ideas?

Here's my code...

pawn Код:
public OnPlayerPause(playerid)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
    {
        PassengerVehicleAFK[playerid] = GetPlayerVehicleID(playerid);
        SeatAFK[playerid] = GetPlayerVehicleSeat(playerid);
        PassengerAFK[playerid] = 1;
        return 1;
    }
pawn Код:
public OnPlayerResume(playerid)
{
    if(PassengerAFK[playerid] == 1)
    {
        PutPlayerInVehicle(playerid, PassengerVehicleAFK[playerid], SeatAFK[playerid]);
        return 1;
    }
The OnPlayerPause & OnPlayerResume work perfectly before you ask. I use these for alot of things in my GM. I just need to know how to re-write my code so this bug can be prevented.
Reply


Messages In This Thread
AFK Passenger teleports vehicle to OnPause position - by Phil_Cutcliffe - 05.02.2014, 12:03
Re: AFK Passenger teleports vehicle to OnPause position - by CuervO - 05.02.2014, 12:12
Re: AFK Passenger teleports vehicle to OnPause position - by Phil_Cutcliffe - 05.02.2014, 12:30

Forum Jump:


Users browsing this thread: 1 Guest(s)