13.04.2015, 10:27
Hi McOwens,
There is a tutorial for texturing here:
https://sampforum.blast.hk/showthread.php?tid=359356
And an actual filterscript that can help you here:
https://sampforum.blast.hk/showthread.php?tid=471474
SetObjectMaterial This is an example taken from the SAMP wiki:
Basically, you need to create your object:
new myobject;
myobject = CreateObject(19371, 10, 10, 10, 0.0, 0.0, 0.0, 300.0);
Then use SetObjectMaterial:
SetObjectMaterial(myobject, 0, 19341, "egg_texts", "easter_egg01", 0xFFFFFFFF);
The syntax for SetObjectMaterial is:
SetObjectMaterial(objectid, materialindex, modelid, txdname[], texturename[], materialcolor);
There is a tutorial for texturing here:
https://sampforum.blast.hk/showthread.php?tid=359356
And an actual filterscript that can help you here:
https://sampforum.blast.hk/showthread.php?tid=471474
SetObjectMaterial This is an example taken from the SAMP wiki:
pawn Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
if(!strcmp(cmdtext,"/mycommand",true))
{
new Float:X, Float:Y, Float:Z;
new myobject;
GetPlayerPos(playerid, X, Y, Z);
myobject = CreateObject(19371, X, Y, Z+0.5, 0.0, 0.0, 0.0, 300.0);
SetObjectMaterial(myobject, 0, 19341, "egg_texts", "easter_egg01", 0xFFFFFFFF);
//Replaces the texture of our object with the texture of object 19341
return 1;
}
return 0;
}
new myobject;
myobject = CreateObject(19371, 10, 10, 10, 0.0, 0.0, 0.0, 300.0);
Then use SetObjectMaterial:
SetObjectMaterial(myobject, 0, 19341, "egg_texts", "easter_egg01", 0xFFFFFFFF);
The syntax for SetObjectMaterial is:
SetObjectMaterial(objectid, materialindex, modelid, txdname[], texturename[], materialcolor);