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;
}
You can't see your own chatbubbles. The same applies to attached 3D text labels. |
Save yourself some time and do it in a more efficient way: https://sampwiki.blast.hk/wiki/SetPlayerChatBubble.
|
According to me.. I think you should create an array
new action[MAX_PLAYERS]; and then use it under your command as action[playerid]; |