Well, Developers have a lot of work to do, so they dont have enough time for mapping cars and stuff. Here I bring a simple and easy tutorial , which will explain you how to map cars without even quitting the game and installing any extra applications.
It requires a simple command, /save
For example, you have donated some money to the server for custom cars and you want the car where you want, it will work like this..
Enter your car , and goto location where you want it to be spawned, like when you /park the car.
After that do this:
This will save your car's position in GTA SA Userfiles > SAMP > savedpositions.txt
Open it and copy the AddStaticVehicle which hasat the end of its lineCode://mycar(the name with which you saved the car position, here I saved it with mycar)
For example, I'll have this:
Since AddStaticVehicleEx has more functions than AddStaticVehicle, then will convert it to AddStaticVehicleEx
You can convert it here
Make sure that you have changed the Input and Output to this:
You'll have the output like this:
There you go, you can give this to DevelopersCode:AddStaticVehicleEx(451,1553.22960000,-1474.97800000,13.25470000,188.92730000,1,-1,15); //Turismo
Why is AddStaticVehicleEx better than AddStaticVehicle?
Well AddStaticVehicleEx is better than AddStaticVehicle because with AddStaticVehicleEx, you can also customize the seconds after which the car will respawn after a user leaves the car....
Defination of AddStaticVehicleEx
You can use this function to add vehicles to your gamemode. This function can only create vehicles in the OnGameModeInit callback, and vehicles created with this function cannot be removed.
Basically, a normal AddStaticVehicleEx works like this:
Code:AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay);Code:modelid = The Model ID for the vehicle. Float:spawn_X = The X-coordinate for the vehicle where it will spawn. Float:spawn_Y = The Y-coordinate for the vehicle where it will spawn. Float:spawn_Z = The Z-coordinate for the vehicle where it will spawn. Float:angle = The facing - angle for the vehicle. color1 = The primary color ID.(Make it -1 if you want it random on each spawn) color2 = The secondary color ID.(Make it -1 if you want it random on each spawn) respawn_delay = The delay until the car is respawned without a driver, in seconds.(Make it 900 for default)I am lazy and I want to /save more than 1 cars but I am lazy to convert them all. What do I do?
Well, in this case, you can just simply add some units in X coordinate[horizontal coordinate] or Y coordinate[vertical coordinate] taking one AddStaticVehicleEx.
For example, you have only this :
and you want more cars to be spawned then you can just edit Model ID or X coordinate or Y Coordinate.Code:AddStaticVehicleEx(451,1553.22960000,-1474.97800000,13.25470000,188.92730000,1,-1,15); //Turismo
Lets take an example, I want to spawn 5 Turismos in one line[horizontally] and I have only one AddStaticVehicleEx, what will I do?
I will simple do this(observed underlined words)
You can clearly see that there's no difference in the different AddStaticVehicleEx(s) but only +4,+8 and +16. This will spawn the cars in one line at equal distances(I have used difference of 4 units only). This not only makes mapping cars easy but also neat. This is best option for lazy mappers/scripters like me :DCode:AddStaticVehicleEx(451,1553.22960000,-1474.97800000,13.25470000,188.92730000,1,-1,15); //Turismo AddStaticVehicleEx(451,1553.22960000+4,-1474.97800000,13.25470000,188.92730000,1,-1,15); //Turismo AddStaticVehicleEx(451,1553.22960000+8,-1474.97800000,13.25470000,188.92730000,1,-1,15); //Turismo AddStaticVehicleEx(451,1553.22960000+16,-1474.97800000,13.25470000,188.92730000,1,-1,15); //Turismo AddStaticVehicleEx(451,1553.22960000+20,-1474.97800000,13.25470000,188.92730000,1,-1,15); //Turismo AddStaticVehicleEx(451,1553.22960000+24,-1474.97800000,13.25470000,188.92730000,1,-1,15); //Turismo