SetDynamicObjectMaterial help
#8

As simple as this:
Код:
CMD:testcmd1(playerid, params[])
{
	new hex:color;
	if (sscanf(params, "x", color))
		return SendSyntaxMessage(playerid, "/testcmd1 [color]");
	
	new Float:px, Float:py, Float:pz;
	GetPlayerPos(playerid, px, py, pz);
	new test = CreateDynamicObject(19462, px, py, pz, 0.0, 0.0, 0.0);
	SetDynamicObjectMaterial(test, 0, 12979, "sw_block9", "sw_wall03", color);
	return 1;
}
Either hex or integer color code will work. When you process it to database, save and load the integer value.

You also want to use GetXYInFrontOfPlayer since the current code would stuck the object on player's character.
Reply


Messages In This Thread
SetDynamicObjectMaterial help - by Obsidian - 30.04.2018, 15:48
Re: SetDynamicObjectMaterial help - by Pottus - 30.04.2018, 16:30
Re: SetDynamicObjectMaterial help - by git - 30.04.2018, 16:36
Re: SetDynamicObjectMaterial help - by Obsidian - 30.04.2018, 18:39
Re: SetDynamicObjectMaterial help - by Pottus - 30.04.2018, 19:14
Re: SetDynamicObjectMaterial help - by Obsidian - 30.04.2018, 20:12
Re: SetDynamicObjectMaterial help - by Obsidian - 01.05.2018, 13:48
Re: SetDynamicObjectMaterial help - by RoboN1X - 01.05.2018, 15:28

Forum Jump:


Users browsing this thread: 1 Guest(s)