Adding nitro by pressing KEY_FIRE
#3

pawn Код:
forward InfiniteNitro();

public OnGameModeInit()
{
      SetTimer("InfiniteNitro", 1000, 1);
      return 1;
}

public InfiniteNitro()
{
      new vehicleid;
      for(new i=0;i<MAX_PLAYERS;i++)
      {
           if(IsPlayerConnected(i))
           {
                if(GetPlayerState(i)==2)
                {
                     vehicleid=GetPlayerVehicleID(i);
                     if(CheckVehicle(vehicleid))
                     AddVehicleComponent(vehicleid,1010);
                }
           }
      }
      return 1;
}            

stock CheckVehicle(vehicleid)
{
      #define MAX_INVALID_NOS_VEHICLES 13

      new InvalidNOSVehicles[MAX_INVALID_NOS_VEHICLES] =
      {
              522, 481, 441, 468, 448, 446, 513, 521, 510, 430, 520, 476, 463
      };

      for(new i = 0; i < MAX_INVALID_NOS_VEHICLES; i++)
      {
            if(GetVehicleModel(vehicleid) == InvalidNOSVehicles[i]) return false;
      }
      return true;
}
Reply


Messages In This Thread
Adding nitro by pressing KEY_FIRE - by x96664 - 12.06.2012, 17:35
Re: Adding nitro by pressing KEY_FIRE - by Faisal_khan - 12.06.2012, 17:42
Re: Adding nitro by pressing KEY_FIRE - by sniperwars - 12.06.2012, 17:50
Re: Adding nitro by pressing KEY_FIRE - by kaisersouse - 12.06.2012, 18:11
Re: Adding nitro by pressing KEY_FIRE - by x96664 - 12.06.2012, 18:46
Re: Adding nitro by pressing KEY_FIRE - by Jonny5 - 12.06.2012, 19:32

Forum Jump:


Users browsing this thread: 1 Guest(s)