[Guide] Re-Texturing

Not open for further replies.


New Member
Nov 15, 2013
Download this and this and this.

Make a new folder and extract the sa-mp server archive into it. After you've done that, open up sscanf.rar and extract it into your server root folder which would be the one you made before.

Open up the sa-mp folder >> pawno >> include and that's where you want to put the zcmd.inc file.

When it's done open up the sa-mp folder >> gamemodes >> Tutorial. Click "OK". Now you should have a white clean pawno page right infront of you. Click at 'open' and then >> sa-mp >> gamemodes >> Tutorial >> OK.

Without any questions add this to the script. Just Copy & Paste.

Add this to the to top of the script. But make sure that #include <a_samp> is above them.
#include <sscanf2>
#include <zcmd>
Add this right at the bottom of the script.
CMD:gotopos(playerid, params[])
	new string[128], Float:x, Float:y, Float:z, in, vw;
	if(sscanf(params, "fffii", x, y, z, in, vw)) return SendClientMessage(playerid, -1, "USAGE: /gotopos [X] [Y] [Z] [Interior] [VirtualWorld]");
	new Float:angle;
        GetPlayerFacingAngle(playerid, angle);
	SetPlayerPos(playerid, x, y, z);
	SetPlayerInterior(playerid, in);
	SetPlayerVirtualWorld(playerid, vw);
	SetPlayerFacingAngle(playerid, angle);
	format(string, sizeof(string), "You has been teleported to selected destination | X:%f - Y:%f - Z:%f - Int:%d - VW:%d |", x, y, z, in, vw);
	SendClientMessage(playerid, -1, string);
	return 1;
It should look like this:

Scroll down to "OnGameModeInit()". That's where you'll type every single object code.

The first thing you want to do is to create the object, obviously.
CreateObject(6959, 2057.96924, 1374.25049, 9.79498,   0.00000, 0.00000, 0.00000);
You have to make a variable.
new test_1  = CreateObject(6959, 2057.96924, 1374.25049, 9.79498,   0.00000, 0.00000, 0.00000);
When we want to retexture the "test_1" we do this:
SetObjectMaterial(test_1, 0, 14536, "pleas_dome","club_floor2_sfwTEST", 0);
So it will look like this when you're done:
public OnGameModeInit()
	new test_1 = CreateObject(6959, 2057.96924, 1374.25049, 9.79498,   0.00000, 0.00000, 0.00000);
        SetObjectMaterial(test_1, 0, 14536, "pleas_dome","club_floor2_sfwTEST", 0);
        return 1;
NOTE: If you want to see how it looks like after retexturing the objects, you HAVE to compile the script and then run the server. Simply click at the "save as" button and save it into the "gamemodes" folder. OVERWRITE THE "Tutorial.pwn" FILE - REALLY IMPORTANT. After you've done that, simply click at samp-server which is located in the server folder. Now your server is running. Open up the SA:MP Client and add a server to your favourites. IP: That's your server running. Connect to it and then go to the object that you've placed by using this command:
/gotopos [X] [Y] [Z] [InteriorWorld] [VirtualWorld]
Explaination of the code above:
SetObjectMaterial(objectid, materialindex, "modelid", "txdname", "texturename", materialcolor)
Some objects doesn't only have one texture, they have like 3. But we want to retexture materiallindex ID 0. So we'll put a "0" into the materiallindex section. Now the "modelid", "txdname" and "texturename" can easily be found here: http://pastebin.com/cKfE3fsG

And the last thing - materialcolor... just put it to 0 if you don't want to change the color. You can't change the color of the object plus change the texture, it doesn't work.

If you've got any questions, simply PM me.
Not open for further replies.