01.05.2018, 15:28
As simple as this:
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.
Код:
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; }
You also want to use GetXYInFrontOfPlayer since the current code would stuck the object on player's character.