[Help] 3D Textdraw command.
#1

The command is supposed to put the parameter into the 3D Textdraw

this is what I have:
pawn Код:
if(strcmp(cmd, "/describe", true) == 0)
    {
        new tmpz[256];
        new stringz[256];
        new idxz;
        tmpz = strtok(cmdtext, idxz);
        if(!strlen(tmpz))
        {
            SendClientMessage(playerid, cerror, "USAGE: /describe [description]");
            return 1;
        }
        else if(ifdescribed[playerid] == 1)
        {
            format(stringz, sizeof(stringz), "* %s ", tmpz);
            Update3DTextLabelText(DDescript[playerid], 0x0096FFFF, stringz);
            return 1;
        }
        else if(ifdescribed[playerid] == 0)
        {
            ifdescribed[playerid] = 1;
            format(stringz, sizeof(stringz), "* %s ", tmpz);
            DDescript[playerid] = Create3DTextLabel(stringz,0x0096FFFF,0.0,0.0,0.0,30.0,0,0);
            Attach3DTextLabelToPlayer(DDescript[playerid], playerid, 0.0, 0.0, 0.3);
            return 1;
        }
    }
The problem is it shows * /describe over there heads instead of the command text.
Reply
#2

I suggest using SSCANF, much easier and neater.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)