[Tutorial] How to add cars to your server
#1

So i've had some ppl asking me lately how to add cars to a server , so hera ya go!

The first thing were gonna do is get SA-MP Debug.(Credits to Simon Campbell)
[ http://solidfiles.com/d/c565f/ ]
[ http://pastebin.com/H4efeEFM ]

Add this to your server config on the filterscript lines.
Quote:

filterscripts fsdebug

Or w/e you have it named

Now start up the server .exe

Now you need to go ig(in game) and
Code:
/v [vehicle name/part of name]
Then simply get into your car, and drive to were you want the car to save.

Then you can do.
Code:
/save [put a comment here]
Now Exit out of game(or alt+tab) and goto
A.)GTA San Andreas user Files(usually in C:/Program Files/Rockstar, maybe Rockstar Games)
B.)Open folder "SAMP"
C.)Double click savedpositions.txt
D.)Copy everything in there
It should be like the following:
Code:
AddStaticVehicle(588,2530.4290,2278.9368,10.5752,0.2145,0,0); // [your comment]
Then open up your gamemode or filterscript
(For Filterscript)
Locate public OnFilterScriptInit() on line 9

Then go under the bracket and paste what you have copied like so:
Code:
public OnFilterScriptInit()
{
        AddStaticVehicle(588,2530.4290,2278.9368,10.5752,0.2145,0,0); // this is the cars we have added,most        //likely more than one
        print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}
And hit Compile

As for gamemodes we do the same as above except in stead of pasting it under public OnFilterScriptInit()
We paste it under public OnGameModeInit()
Like so:
Code:
public OnGameModeInit()
{
	AddStaticVehicle(588,2530.4290,2278.9368,10.5752,0.2145,0,0);
	SetGameModeText("Blank Script");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}
And once again hit compile

Then add the filterscript(or gamemode) to the filterscript or gamemode line in Server.cfg
EX: filterscripts Cars
gamemode0 Cars


And Congrats you now know how to get cars in your server
Have fun!
Reply
#2

not bad intended but when your a scripter shouldnt you know this already?
Reply
#3

Yes you should but i mainly made this for the people who don't really know or are learning pawno and may not understand any of the advanced tutorials
Reply
#4

Nice work keep it up ! .
Reply
#5

Quote:
Originally Posted by ifly4life
View Post
Yes you should but i mainly made this for the people who don't really know or are learning pawno and may not understand any of the advanced tutorials
small correction its pawn*
Reply
#6

Nice tutorial and its very usefull for the beginners
Reply
#7

Quote:
Originally Posted by Meyer
View Post
small correction its pawn*
nope the prgram is called pawno the language is pawn but yo can also say pawno
Reply
#8

Quote:
Originally Posted by justsomeguy
View Post
not bad intended but when your a scripter shouldnt you know this already?

Tutorials are supposed to learn people how to do this and that, not to have people who already know it read them.

OT: You're now showing it as if you're adding the same vehicle in both a filterscript as the gamemode itself. You should clearly tell them when to use it in a filterscript or in a gamemode. You should also tell the people at home WHY they should use On(GameMode/FilterScript)Init instead of a different callback.
Reply
#9

thanks alot dude
Reply
#10

please ! tutorials like this i've seen like 200000.. and no one does'nt know how to add cars to his server.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)