SetDynamicObjectMaterialText doesn't appear to be working.
#1

Here's the code, all it do is make the object invisible, and no text on it.
Is there anything that I need to know regarding this function?

pawn Код:
SetDynamicObjectMaterialText(DynamicObjectInfo[objectid][doObject], 0, DynamicObjectInfo[objectid][doText], DynamicObjectInfo[objectid][doMaterialSize], DynamicObjectInfo[objectid][doFontFace], DynamicObjectInfo[objectid][doFontSize], DynamicObjectInfo[objectid][doBold], DynamicObjectInfo[objectid][doFontColor], DynamicObjectInfo[objectid][doBackColor], DynamicObjectInfo[objectid][doAlign]);
pawn Код:
format(DynamicObjectInfo[objectid][doText], 128, "NEW OBJECT");
DynamicObjectInfo[objectid][doMaterialSize] = 140;
format(DynamicObjectInfo[objectid][doFontFace], 60, "Arial");
DynamicObjectInfo[objectid][doFontSize] = 8;
DynamicObjectInfo[objectid][doBold] = 0;
format(DynamicObjectInfo[objectid][doFontColor], 60, "0xFFFFFF00");
format(DynamicObjectInfo[objectid][doBackColor], 60, "0");
DynamicObjectInfo[objectid][doAlign]= 1;

Thanks.
P.S: Note that Im using SetDynamicMaterialText.
Reply
#2

beep bump :c
Reply
#3

pawn Код:
format(DynamicObjectInfo[objectid][doText], 128, "NEW OBJECT");
DynamicObjectInfo[objectid][doMaterialSize] = 140;
format(DynamicObjectInfo[objectid][doFontFace], 60, "Arial");
DynamicObjectInfo[objectid][doFontSize] = 8;
DynamicObjectInfo[objectid][doBold] = 0;
format(DynamicObjectInfo[objectid][doFontColor], 60, "0xFFFFFF00");
format(DynamicObjectInfo[objectid][doBackColor], 60, "0");
DynamicObjectInfo[objectid][doAlign]= 1
;

pawn Код:
format(DynamicObjectInfo[objectid][doText], 128, "NEW OBJECT");
DynamicObjectInfo[objectid][doMaterialSize] = 140;
format(DynamicObjectInfo[objectid][doFontFace], 60, "Arial");
DynamicObjectInfo[objectid][doFontSize] = 8;
DynamicObjectInfo[objectid][doBold] = 0;
DynamicObjectInfo[objectid][doFontColor] = 0xFFFFFF00;
DynamicObjectInfo[objectid][doBackColor] = 0;
DynamicObjectInfo[objectid][doAlign]= 1
;

You were trying to some some bizarre formatting.... 0xFFFFFF00 this is actually an integer.
Reply
#4

I'll test this, thanks for replying.
Reply
#5

works, but how do I format it then?

For example, here's my command.

pawn Код:
CMD:otext(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pMapper] == 1)
    {
        new job[128], objectid, jobstring[150], string[150];
        if(sscanf(params, "s[150]is[150]", job, objectid, jobstring))
        {
            //
            return 1;
        }
        if(!(0 <= objectid < MAX_DOBJECTS)) return SendClientMessageEx(playerid, COLOR_WHITE, "Invalid dynamic object ID!");

        if(strcmp(job, "fontcolor", true) == 0)
        {
            new value;
            value = strval(jobstring);

            DynamicObjectInfo[objectid][doFontColor] = value;
            format(string, sizeof(string), "Object Font Color assigned to %d", DynamicObjectInfo[objectid][doFontColor]);
            SendClientMessageEx(playerid, COLOR_WHITE, string);
            SaveDynamicObjects();

            format(string, sizeof(string), "%s has edited Objectid %d's Font Color to %d.", GetPlayerNameEx(playerid), objectid, jobstring);
            Log("RP/Logs/oedit.log", string);
        }
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use that command!");
        return 1;
    }
    return 1;
}
P/S: This is edited version of the command, but it is all what you need to know regarding it.

What am I supposed to do? How do I format it, or is it impossible?
Reply
#6

Bump, anyone know how to update it then?
Reply
#7

Do not use it, it causes large memory usage
Reply
#8

Wow, thanks for telling.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)