[HELP] Textuer +REP
#4

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:
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;
}
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);
Reply


Messages In This Thread
[HELP] Textuer +REP - by McOwens - 13.04.2015, 10:02
Re: [HELP] Textuer +REP - by MEW273 - 13.04.2015, 10:15
Re: [HELP] Textuer +REP - by McOwens - 13.04.2015, 10:23
Re: [HELP] Textuer +REP - by MEW273 - 13.04.2015, 10:27

Forum Jump:


Users browsing this thread: 2 Guest(s)