Exit veh with F key
#1

Hey, I just came up with a idea to eject player from the vehicle if it's turned off engine (Then player is freezed)
I made this code

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if(newkeys == KEY_ACTION)
    {
      if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
          new VID = GetPlayerVehicleID(playerid);
            if(VehicleStarted[VID] == 0)
            {
              RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
    }
    return 1;
}
It doesn't seems to work. Anyone see a problem?
Reply


Messages In This Thread
Exit veh with F key - by Blt950 - 13.12.2009, 16:52
Re: Exit veh with F key - by Zamaroht - 13.12.2009, 17:01
Re: Exit veh with F key - by Blt950 - 13.12.2009, 17:04
Re: Exit veh with F key - by saiberfun - 13.12.2009, 17:11
Re: Exit veh with F key - by Blt950 - 13.12.2009, 17:16
Re: Exit veh with F key - by Zamaroht - 13.12.2009, 17:18
Re: Exit veh with F key - by Blt950 - 13.12.2009, 17:21

Forum Jump:


Users browsing this thread: 1 Guest(s)