Register

If you already have an account with us, please use the login panel below to access your account.

Results 1 to 12 of 12

Threaded View

  1. #1
    Old-School Veteran 500 Posts500 Posts Bani Raheja's Avatar
    Join Date
    Jan 2011
    Age
    32
    Posts
    1,234
    In-Game Name(s)
    Bani_Raheja
    Post Thanks / Like

    [GUIDE] How to map a car for Developers

    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 has
    Code:
     //mycar(the name with which you saved the car position, here I saved it with mycar)
    at the end of its line
    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:
    Code:
    AddStaticVehicleEx(451,1553.22960000,-1474.97800000,13.25470000,188.92730000,1,-1,15); //Turismo
    There you go, you can give this to Developers

    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 :
    Code:
    AddStaticVehicleEx(451,1553.22960000,-1474.97800000,13.25470000,188.92730000,1,-1,15); //Turismo
    and you want more cars to be spawned then you can just edit Model ID or X coordinate or Y Coordinate.
    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)

    Code:
    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
    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 :D
    Last edited by Bani Raheja; 29th June 2012 at 12:02 PM.
    - Controversial Signature -

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Click to connect to Discord (San Andreas Roleplay)Click to go to the official San Andreas Multiplayer websiteDownload Teamspeak