Mask problem?
#1

Attach3DTextLabelToPlayer And Create3DTextLabel wont work when i use /mask

pawn Код:
COMMAND:mask(playerid, params[])
{
    new string[128],sendername[MAX_PLAYER_NAME];
    if (PlayerInfo[playerid][pMask] == 0) return SendClientMessage(playerid, COLOR_WHITE, "SERVER: You dont have a mask.");
    switch(PlayerInfo[playerid][pMaskuse])
    {
        case 0:
        {
            PlayerInfo[playerid][pMaskuse] = 1;
            format(string, sizeof(string), "* Stranger_%d puts on %s mask.",PlayerInfo[playerid][pMaskID], CheckSex(playerid));
            foreach (Player,i)
            {
                ShowPlayerNameTagForPlayer(i,playerid,0);
            }
            PlayerMask[playerid] = Create3DTextLabel(PlayerNameEx(playerid),0xFFFFFFFF,0.0,0.0,0.0,8.0,GetPlayerVirtualWorld(playerid),1);
            Attach3DTextLabelToPlayer(PlayerMask[playerid],playerid,0.0,0.0,0.2);
        }
        case 1:
        {
            PlayerInfo[playerid][pMaskuse] = 0;
            format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
            GiveNameSpace(sendername);
            format(string, sizeof(string), "* %s takes off %s mask.", sendername, CheckSex(playerid));
            foreach (Player,i)
            {
                ShowPlayerNameTagForPlayer(i,playerid,1);
            }
            Delete3DTextLabel(PlayerMask[playerid]);
        }
    }
    ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    return 1;
}
and here is the callback

pawn Код:
}
stock PlayerNameEx(playerid)
{
    new name[MAX_PLAYER_NAME];
    switch(PlayerInfo[playerid][pMaskuse])
    {
        case 0:
        {
            GetPlayerName(playerid, name, sizeof(name));
            return name;
        }
        case 1:
        {
            format(name,sizeof(name),"Stranger_%d",PlayerInfo[playerid][pMaskID]);
            return name;
        }
    }
    return name;
}
Reply
#2

How did you know that it doesn't work? Did you just type /mask and and didn't see anything above your head?!

I'd say you can not see the mask by yourself (Just like you can not see the health and armour bar of your character). Get another player to check it for you first then complain.
Reply
#3

Quote:
Originally Posted by HellSphinX
Посмотреть сообщение
How did you know that it doesn't work? Did you just type /mask and and didn't see anything above your head?!

I'd say you can not see the mask by yourself (Just like you can not see the health and armour bar of your character). Get another player to check it for you first then complain.
Lol you think i'm dumb?? i already tested on a other players....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)