SA-MP Forums Archive
Help with my /nos command - 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: Help with my /nos command (/showthread.php?tid=152754)



Help with my /nos command - Jay. - 05.06.2010

Yo so, I've made a /nos command that applys it to vehicles, But when somone types it like on a bike the game crashes S:

I can't have this i want it to say sorry u can't install nitro to this vehicle or somthing thanks


XtremE_


Re: Help with my /nos command - [UGP]Oscar - 05.06.2010

hi jay iam [UGP]Oscar


Re: Help with my /nos command - Jay. - 05.06.2010

Quote:
Originally Posted by [UGP
Oscar ]
hi jay iam [UGP]Oscar
Off topic: Yo oscar, You can script lol?


Re: Help with my /nos command - [UGP]Oscar - 05.06.2010

[quote=[XS]XtremE_ ]
Quote:
Originally Posted by [UGP
Oscar ]
hi jay iam [UGP]Oscar
Off topic: Yo oscar, You can script lol?
[/quote
nah


Re: Help with my /nos command - Flashy - 05.06.2010

Donґt go offtopic please.
Topic: If yoou want show us your /nos command


Re: Help with my /nos command - LTomi - 05.06.2010

pawn Код:
if(strcmp("/nos", cmdtext, true) == 0)
   {
     if(IsPlayerInVehicle(playerid))
     {
        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == ... ); // Check the model of the vehicle. Write the IDs of the bikes here.
        {
          SendClientMessage(playerid, COLOR_RED, "Sorry, you can't install NOS on this vehicle.");
        }
        else
        {
          // Add the NOS here.
        }
     }
     else
     {
        SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle.");
     }
     return 1;
   }



Re: Help with my /nos command - Jay. - 05.06.2010

Quote:
Originally Posted by LTomi
pawn Код:
if(strcmp("/nos", cmdtext, true) == 0)
   {
     if(IsPlayerInVehicle(playerid))
     {
        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == ... ); // Check the model of the vehicle. Write the IDs of the bikes here.
        {
          SendClientMessage(playerid, COLOR_RED, "Sorry, you can't install NOS on this vehicle.");
        }
        else
        {
          // Add the NOS here.
        }
     }
     else
     {
        SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle.");
     }
     return 1;
   }
Can't i only put one model ID in there?

Quote:

if(GetVehicleModel(GetPlayerVehicleID(playerid)) == ... ); // Check the model of the vehicle. Write the IDs of the bikes here.




Re: Help with my /nos command - Jay. - 05.06.2010

Well?


Re: Help with my /nos command - Infinity - 05.06.2010

Well, yeah. it;s only for the models.


Re: Help with my /nos command - LTomi - 05.06.2010

You can put as many IDs as you want:

pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == ID1 || GetVehicleModel(GetPlayerVehicleID(playerid)) == ID2 || GetVehicleModel(GetPlayerVehicleID(playerid)) == ID3 ... );
But you have to put the MODEL IDs here, NOT the VEHICLE IDs.