Help With Engine Please
#5

Try this:

pawn Код:
if(newkeys == KEY_WALK)
{
  if(IsPlayerInAnyVehicle(playerid))
  {
    new Vehicle = GetPlayerVehicleID(playerid), name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    if(VehicleStarted[Vehicle] == 1)
    {
      format(string, sizeof(string), "* %s turns the engine off", name);
      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
      print(string);
      VehicleStarted[Vehicle] = 0;
      TogglePlayerControllable(playerid,1);
      RemovePlayerFromVehicle(playerid);
    }
    else
    {
      format(string, sizeof(string), "* %s tries to start the vehicle", name);
      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
      print(string);
      GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~g~Starting vehicle...",3000,3);
      SetTimerEx("Starting",3500,0,"i",playerid); //I hope you have 'VehicleStarted[Vehicle] = 1;' somewhere in this timer.
    }
  }
}
Reply


Messages In This Thread
Help With Engine Please - by wordas - 14.02.2009, 18:36
Re: Help With Engine Please - by yom - 14.02.2009, 18:59
Re: Help With Engine Please - by wordas - 14.02.2009, 19:01
Re: Help With Engine Please - by wordas - 15.02.2009, 07:01
Re: Help With Engine Please - by Finn - 15.02.2009, 08:14
Re: Help With Engine Please - by tony_fitto - 16.02.2009, 15:26
Re: Help With Engine Please - by MenaceX^ - 16.02.2009, 16:26
Re: Help With Engine Please - by wordas - 21.02.2009, 17:08

Forum Jump:


Users browsing this thread: 1 Guest(s)