Can't solve this
#1

Hey I'm trying to make mask system but I don't know how to hide player's name, is possible to hide only name from 1 player if he wears mask? I was thinking about ShowNameTags(0)... (or what ever is that function) and then to set 3Dtext Labels over Player's head with theirs names when they spawn... but I need to create for example 50 text labels and attach them to players when they connect or what..? I'm really new to those labels and so on so can you help me with mask system a bit? some advices and tips are really welcome ^^ thank you in advance
Reply
#2

Use this from SA-MP Wiki
https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer
Reply
#3

pawn Код:
CMD:mask(playerid)
{
        if(Masked[playerid] == 0)
        {
            Masked[playerid] = 1;
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                ShowPlayerNameTagForPlayer(i, playerid, 0);
                ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0);
                SetPlayerAttachedObject(playerid, 1, 19037, 2, 10, 4.7, 0.0, 90, 90, 0);
            }
            SendClientMessage(playerid, COLOR_LIGHTGREEN, "You put your Mask on!");
            return 1;
        }
        else if(Masked[playerid] == 1)
        {
            Masked[playerid] = 0;
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                ShowPlayerNameTagForPlayer(i, playerid, 1);
            }
            SendClientMessage(playerid, COLOR_LIGHTGREEN, "You took your Mask off!");
            return 1;
        }
        return 1;
}
For now I made this, will this work? even if new players connect will player's name be hiden?
Reply
#4

Your code looks correct, I think it will work. But you may test it with someone also to check
Reply
#5

Well I tested with myself for now but it sends me only messages, it doesn't apply animation and attach object :/
Reply
#6

Anyone please? :/
Reply
#7

Removed
Reply
#8

Okay I fixed animation, but how can I apply object on player's face? Anyone have the right coordinates?
Reply
#9

Fixed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)