[Tutorial] How to map, texture and make your own text objects.
#1




In this tutorial, I'm basically going to show you how to map, how to texture and how to make your own text objects. I'll also include parts when you setup your own server on localhost so you can test all the work you've done plus two basic commands to help you explore your work. I hope this tutorial will help you, if you have some suggestions and if I've missed something or made a mistake, I'd appreciate if you'd post it. Also, rates and comments are welcome!

Alright, we'll begin with what you would need to get everything working. I'm going to miss GTA:SA and SA:MP since it's obvious you'd need them. Alright, so for start you'll have to download the latest SA-MP server package from here. When you're done and downloaded it, you should setup the configuration files, but we'll do that at the end. Then you'll need the map editor, which can be downloaded from here. You'll have to open it with a RaR or ZiP file extractor, which can be found here (32-bit) & here (64-bit). Alright, so when you open the editor.rar which you downloaded, you have to select all files, then click "Extract" icon in the left-up side of the program. Browse for your GTA:SA directory and then submit it. Congratulations, you have your Map Editor installed!

Now, you're going to learn the basics of the map editor. Go to the GTA:SA directory and find the editor.exe, which you extracted before. Open it. When it opens, click on "Load with colls" button. It will set your position to the area 51, which is normal. You can now see the buttons upside. There are also descriptions near them, for example you can press the green + and it's also described as a insert object. So, the basic thing is, inserting objects. You can find the objects on internet, but my favorite site is this one. You have to click the Insert Object button and enter the object id, which is visible (including a screenshot) on the site above. So, about how to move an object, you can use the hotkeys, which is the easiest way to do it.
- Ground Movement (hold left moust button, and drag the mouse).
- Vertical Movement (hold the middle mouse button, and drag the mouse).
- Heading Rotation (hold the CTRL + left mouse button, and drag the mouse.)
- XY Rotation (hold the CTRL + middle mouse button, and drag the mouse.)
This is very easy to learn, the hard thing is texturing, but if you learn it, it becomes easier and easier in time.

Now, I'm going to show you how to re-texture/texture objects. There are many sites and you can just ****** "SAMP Textures", but I prefer this site, which is also the one of the most popular sites for texturing SAMP objects. Alright, so you have to find your object which you've placed on that site (I'm going to put examples for now) and follow my steps. When you find the object, it should look like this:

Then, you have to move your mouse cursor onto it and press "Show Code", like this

And now, we'll get a dialog with some options, like this



You've got the texture's data which is needed to re-texture the specified object. So now, we're going to put a texture into the script. I've done a simple table with 4 chairs, 2 glasses of wine and a bottle of wine. So now, I'm going to export the code. The map looks like this;



And now, I'll have to click on the "Show Code" button, up in the toolbar.



Then, a simple code dialog pops up, like this



Now, you'll have to open the pawno.exe from the server package which you have downloaded at the beginning. So now, you'll have to extract the files from the samp server package, which you downloaded at the beginning. When you've got it extracted, open "sampserver/pawno/pawno.exe". Then, you should make some defines and includes for the filterscript, so we can make it work. Just press "New" button (blank paper icon), select all, delete and paste this;
Code:
#define FILTERSCRIPT

#include <a_samp>
#include <streamer>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	CreateObject(2644, 2942.15088, -1427.64478, 10.24027,   -2.04000, 0.12000, 4.92000);
	CreateObject(2309, 2941.14966, -1427.69055, 9.87354,   0.00000, 0.00000, 274.21552);
	CreateObject(2309, 2942.28784, -1428.89575, 9.87354,   0.00000, 0.00000, 365.05557);
	CreateObject(2309, 2943.19043, -1427.52478, 9.87354,   0.00000, 0.00000, 454.39560);
	CreateObject(2309, 2942.05859, -1426.50024, 9.87354,   0.00000, 0.00000, 544.09552);
	CreateObject(1667, 2942.15015, -1427.34509, 10.75265,   0.00000, 0.00000, 0.00000);
	CreateObject(1667, 2942.43140, -1427.61328, 10.75265,   0.00000, 0.00000, 0.00000);
	CreateObject(1950, 2942.21655, -1427.51648, 10.80421,   0.00000, 0.00000, 0.00000);
	// retexture
	SetObjectMaterial(CreateObject(1950, 2942.21655, -1427.51648, 10.80421,   0.00000, 0.00000, 0.00000), 0, 18202, "w_towncs_t", "sjmroof1", 0xFFFFFFFF);
	return 1;
}


public OnPlayerConnect(playerid)
{
	// put your RemoveBuildingForPlayer codes here
	return 1;
}

#endif
I've chosen some shitty texture, just to show you guys. So now, we'll have to make a simple commands that will allow us to easily check our stuff ingame.

You'll have to have the ZCMD include, which can be downloaded from here.
Now, we will make a simple /jetpack command that will spawn us a jetpack and let us to fly around to check our maps.

Code:
#define FILTERSCRIPT
#define COLOR_GREEN 0x00FF00FF

#include <a_samp>
#include <zcmd>

#if defined FILTERSCRIPT

CMD:jetpack(playerid, params[])
{
        SendClientMessage(playerid, COLOR_GREEN, "You have spawned a jetpack.");
		SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
		return 1;
}
#endif
You now have just to press F5 in both of the .pwn files (maps.pwn and commands.pwn) and save them as you wish.


Now, we have to optimize our server. When you have compiled the maps.pwn and commands.pwn, you should get maps.amx and commands.amx into the folder you've chosen to save. You'll now have to move them from that folder to your samp server folder/filterscripts. In your SA-MP server folder, you've got server.cfg file. Simply open it with the notepad, select all, delete and paste this inside:
Code:
echo Executing Server Config...
lanmode 0
hostname Test Server
weburl forum.sa-mp.com
mapname San Andreas
language English
password 
rcon_password rconpassword
maxplayers 50
port 7777
maxnpc 0
rcon 0
announce 1
query 1
lagcompmode 1
messageholelimit 30000
messageslimit 5000
ackslimit 30000
gamemode0 bare 1
filterscripts maps commands
plugins streamer sscanf
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
Save it and close it. You're now able to open samp-server.exe. When you do so, head to your SA:MP client program, click on the "Add Server" button and enter
Code:
:7777
inside the box. Click "OK" button and connect to the server!

We've gone through the tutorial, it took me an hour to write, but it's worth it because you don't see so many mappers around these days.

~Kevin
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)