SA-MP Forums Archive
3D text label not showing up - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 3D text label not showing up (/showthread.php?tid=581990)



3D text label not showing up - DarkLored - 17.07.2015

I have made a /me command and I have tried adding a 3D text label to show up every time someone uses the command but it doesn't show up at all.

pawn Код:
CMD:me(playerid, params[])
{
    new string[400];
    if(pLoggedIn[playerid] == false)
    {
        SendClientMessage(playerid, -1, "[ERROR] You must first sign in before using this command.");
        return 1;
    }
    if(strlen(params) > 400)
    {
        SendClientMessage(playerid, -1, "[ERROR] Maximum length is 400 words!");
        return 1;
    }
    if(sscanf(params, "s[400]", params))
    {
        SendClientMessage(playerid, -1, "USAGE: /me (action).");
        return 1;
    }
    format(string, sizeof(string), "%s %s", RemoveUnderscore(playerid), params);
    ProxDetector(30.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
    action = Create3DTextLabel(string, 0xC2A2DAAA, 30.0, 40.0, 50.0, 30.0, 0, 1);
    Attach3DTextLabelToPlayer(action, playerid, 0.0, 0.0, 0.7);
    RemoveText[playerid] = 10;
    return 1;
}



Re: 3D text label not showing up - SickAttack - 17.07.2015

Save yourself some time and do it in a more efficient way: https://sampwiki.blast.hk/wiki/SetPlayerChatBubble.

Quote:

You can't see your own chatbubbles. The same applies to attached 3D text labels.




Re: 3D text label not showing up - TheRaGeLord - 17.07.2015

According to me.. I think you should create an array

new action[MAX_PLAYERS];

and then use it under your command as action[playerid];



Re: 3D text label not showing up - DarkLored - 17.07.2015

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
Save yourself some time and do it in a more efficient way: https://sampwiki.blast.hk/wiki/SetPlayerChatBubble.
Thanks I didn't know that function exists

Quote:
Originally Posted by TheRaGeLord
Посмотреть сообщение
According to me.. I think you should create an array

new action[MAX_PLAYERS];

and then use it under your command as action[playerid];
That's not gonna help, it's just random advice that won't work anyways SickAttack gave me an answer to my issue.