How do I add vehicles to the map?
#1

The /save command i get this in savedpositions.txt

AddPlayerClass(287,414.3279,2442.6599,16.5000,59.0 561,0,0,0,0,0,0); //


How would i make that a vehicle?

Say make it an infernus ( id 411 ) etc...
Reply
#2

AddPlayerClass and Creating a vehicle are two different things.

To make a vehicle you'll need to read this.

https://sampwiki.blast.hk/wiki/AddStaticVehicleEx

AddStaticVehicle

https://sampwiki.blast.hk/wiki/AddStaticVehicle << This doesn't have a customer respawn timer. AddStaticVehicleEx does.

Hope I helped.

EDIT: Or this.

https://sampwiki.blast.hk/wiki/CreateVehicle
Reply
#3

Quote:

CreateVehicle(520, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1, 60);

Ok so wich part is the co ordinates?
Reply
#4

Oh and how would i lock it to a certain playername?
Reply
#5

It tells you.

pawn Код:
(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay)
pawn Код:
CreateVehicle(520, X, Y, Z, ANGLE, COLOR1, COLOR2, RESPAWN);
Here is an example.

pawn Код:
CreateVehicle(411, 0.0, 0.0, 0.0, 10.0, 0, 0, 10);
That will create an Infernus, the Infernus will be spawned in the middle of San Andreas somewhere, the angle is 10.0, the color will be Black and if you exit the Infernus it will be re-spawned within 10 seconds.

This is a way to make a vehicle only be accessible via PlayerName

pawn Код:
new Mimic; //change this
pawn Код:
Mimic = CreateVehicle(modelid, X, Y, Z, ANGLE, COLOR1, COLOR2, RESPAWN); // edit this ofc
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
   new PlayerName[MAX_PLAYER_NAME];
   GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
   if(newstate == PLAYER_STATE_DRIVER)
   {
      new vehicle = GetPlayerVehicleID(playerid);
      if(vehicle == Mimic)
      {
          if(strcmp(PlayerName,"Mimic",true))
          {
             RemovePlayerFromVehicle(playerid);
             SendClientMessage(playerid, YOURCOLOR, "You are not allowed to enter this vehicle");
          }
     }
}
Reply
#6

~ Moved ~
Reply
#7

Just go ingame, get a car and type /save.
Reply
#8

Quote:
Originally Posted by Eiy Mard
Посмотреть сообщение
try my filtescript ... in game type /mycar .. i know there some bugs .. im lazy to fix the bugged .. haha .. so join .. the car system

download here : URL REMOVED
i'd rather not, i think this ois just advertizing.

Edit:
Quote:
Originally Posted by Eiy Mard
Посмотреть сообщение
no i dont want make advertizing ... ok .. sorry .. :/
Not meaning to sound harsh but really it seems advertizing because people tend not to install buggy things.
Reply
#9

Quote:
Originally Posted by JAMMIEISFTW
Посмотреть сообщение
i'd rather not, i think this ois just advertizing.
no i dont want make advertizing ... ok .. sorry .. :/
Reply
#10

How would i turn

pawn Код:
AdminVehicle1 = AddStaticVehicle(470,-1769.3173,289.2891,8.4550,136.8497,43,0); //
Into an AddStaticVehicleEx?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)