SA-MP Forums Archive
Nitro - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Nitro (/showthread.php?tid=61536)



Nitro - LibertyWorld - 13.01.2009

How to make a command give nitro i know how to make all except the part to make nitro.


Re: Nitro - Sandra18[NL] - 13.01.2009

Search for "AddVehicleComponent"


Re: Nitro - LibertyWorld - 13.01.2009

Quote:
Originally Posted by =>Sandra<=
Search for "AddVehicleComponent"
Hey Sandra,

Thanks I will search for that.


Re: Nitro - LibertyWorld - 14.01.2009

How to make it work on a command?


Re: Nitro - hamptonin - 14.01.2009

Quote:
Originally Posted by Ј1b3r7Ґ W0rЈР
How to make it work on a command?
SEARCH


Re: Nitro - LibertyWorld - 14.01.2009

Does that I found I can't make them work.

Can anyone help me?


Re: Nitro - AlExAlExAlEx - 14.01.2009

TIP :
OnPlayerCommandText


Re: Nitro - LibertyWorld - 14.01.2009

Quote:
Originally Posted by AlExAlExAlEx
TIP :
OnPlayerCommandText
I know that


Re: Nitro - LibertyWorld - 09.02.2009

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;
}