Ok when a person do /ame and the text the text is supposed to show on his head the 3d text label but it doesnt it doesnt show at all heres my command
Код:
if(strcmp(cmd, "/ame", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' ' ))
{
idx++;
}
new offset = idx;
new result[500];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ame [action]");
return 1;
}
MaskNumber[playerid] = 1000+random(8999);
if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "[Mask_%d_70] %s.",PlayerInfo[playerid][pMaskNumber],result);
Player = CreatePlayer3DTextLabel(playerid,string,0xC2A2DAAA,30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(Player, playerid, 0.0, 0.0, 0.7);
SetTimerEx("playertext", 7000, 0, "i", playerid);
}
else
{
new Text3D:Player;
format(string, sizeof(string), "* %s %s.", sendername, result);
Player = CreatePlayer3DTextLabel(playerid,string,0xC2A2DAAA,30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(Player, playerid, 0.0, 0.0, 0.7);
SetTimerEx("playertext", 7000, 0, "i", playerid);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
printf("%s", string);
}
return 1;
}