Nitro
#9

Fixed.

pawn Код:
if(strcmp(cmd, "/nitro", true) == 0)
{
  if(IsPlayerInInvalidNosVehicle(playerid,GetPlayerVehicleID(playerid)))
  {
    SendClientMessage(playerid,0xFF6A6AFF,"You can't add Nitro to this vehicle.");
  }
  else
  {
    AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
        SendClientMessage(playerid,0xFFFF00AA,"NOS Ideta.");
  }
  return 1;
}
pawn Код:
IsPlayerInInvalidNosVehicle(playerid,vehicleid)
{
  #define MAX_INVALID_NOS_VEHICLES 29

  new InvalidNosVehicles[MAX_INVALID_NOS_VEHICLES] =
  {
    581,523,462,521,463,522,461,448,468,586,
    509,481,510,472,473,493,595,484,430,453,
    452,446,454,590,569,537,538,570,449
  };

  vehicleid = GetPlayerVehicleID(playerid);

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


Messages In This Thread
Nitro - by LibertyWorld - 13.01.2009, 20:15
Re: Nitro - by Sandra18[NL] - 13.01.2009, 20:16
Re: Nitro - by LibertyWorld - 13.01.2009, 20:19
Re: Nitro - by LibertyWorld - 14.01.2009, 14:36
Re: Nitro - by hamptonin - 14.01.2009, 14:38
Re: Nitro - by LibertyWorld - 14.01.2009, 21:21
Re: Nitro - by AlExAlExAlEx - 14.01.2009, 21:25
Re: Nitro - by LibertyWorld - 14.01.2009, 21:34
Re: Nitro - by LibertyWorld - 09.02.2009, 18:09

Forum Jump:


Users browsing this thread: 1 Guest(s)