05.02.2014, 12:03
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...
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.
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;
}