SA-MP Forums Archive
How to make faction cars ? - 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)
+--- Thread: How to make faction cars ? (/showthread.php?tid=55935)



How to make faction cars ? - Andron - 22.11.2008

Can somone explain how make faction cars ? Like PD,DMV,Ambulance etc ..


Re: How to make faction cars ? - AiVAMAN - 22.11.2008

sorry, but i don't understood you... more detailed please?


Re: How to make faction cars ? - Andron - 22.11.2008

Like example ..

If I want make new taxi cab you know.. So , with that new taxi cab driver can be only Taxi driver , and another players who try to drive with it get eject from car with message "You are not taxi driver" .. or like this .


Re: How to make faction cars ? - Dark_Kostas - 22.11.2008

First add this command

pawn Код:
if(strcmp(cmd, "/carid", true) == 0)
    {
      if(IsPlayerConnected(playerid))
      {
     if(IsPlayerInAnyVehicle(playerid))
     {
      new car = GetPlayerVehicleID(playerid);
          format(string, sizeof(string), "Your car id is: %d",car);
          SendClientMessage(playerid, COLOR_GREY, string);
         }
         else
         {
         SendClientMessage(playerid, COLOR_GREY, "You must be in a vehicle");
         }
      }
      return 1;
    }
And when you are in game,in the car that you added type /carid.You will see a number.

Then search for

pawn Код:
if(newcar == 82 || newcar == 84 || newcar == 85 || newcar == 94)
        {
          if(PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10) { }
          else
            {
            SendClientMessage(playerid,COLOR_GREY,"  You are not a Taxi Driver !");
            RemovePlayerFromVehicle(playerid);
          }
        }
And add the number next to "newcar == 94"

Ex when you type /carid.If you see "Your car id is: 123456"
Add this
if(newcar == 82 || newcar == 84 || newcar == 85 || newcar == 94 || newcar == 123456)

AND ASK THE GODFATHER QUESTIONS TO THE GODFATHER THREAD



Re: How to make faction cars ? - MenaceX^ - 22.11.2008

Is it for GF?


Re: How to make faction cars ? - Dark_Kostas - 22.11.2008

Quote:
Originally Posted by MenaceX
Is it for GF?
Faction cars,DMV,taxi,PD and exactly THAT message is from GF


Re: How to make faction cars ? - AiVAMAN - 22.11.2008

who cares?? GF, not GF...


Re: How to make faction cars ? - Zoopaman - 22.11.2008

btw, wouldn't it be better to add the car's modelid (400-611) and just set a couple of exceptions when/if needed? IMO makes the code lighter and allows to swap cars w/o worrying about remembering to change the IDs...


Re: How to make faction cars ? - Danut - 22.11.2008

Quote:
Originally Posted by Lt_Aivariux
who cares?? GF, not GF...
not who cares X( you have a GodFather Topic


Re: How to make faction cars ? - AiVAMAN - 23.11.2008

lol GodFather sucks... xD