SA-MP Forums Archive
mask cmd - 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: mask cmd (/showthread.php?tid=457258)



mask cmd - GGW - 10.08.2013

hi all , i'm trying to find a /mask cmd to hide the player name but i want it in strcmd so i hope you help me and thank you all have a nice day


Re: mask cmd - GGW - 11.08.2013

any one know ?


Re: mask cmd - Mattakil - 11.08.2013

One thing that you can do is to remove the name ontop of the player (Where it shows their name and health) and use a 3dtextlabel to replace it, set it using GetPlayerName, when they use /mask to change the name to a random code, then when they talk it uses their mask code, it would require some other scripting, as the code would want to save, unless you want their name to come up as "Masked Male". If you dont know how to do what I am saying, then you can use SetPlayerName


Re: mask cmd - GGW - 12.08.2013

Hmm i try this but its not helping tonot make the players see you i need to make nothing on my player head But Thanks for Reply


Re: mask cmd - JeaSon - 12.08.2013

pawn Код:
if(strcmp(cmd, "/mask", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pMember] != 8 && PlayerInfo[playerid][pMember] != 7 && PlayerInfo[playerid][pMember] != 2)
            {
                SendClientMessage(playerid, COLOR_GREY, "  Access Denied");
                return 1;
            }
            if(HasBoughtMask[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "You don't have a mask.");
                return 1;
            }
            if(PlayerInfo[playerid][pMask] == 0)
            {
                for(new i; i<MAX_PLAYERS; i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        ShowPlayerNameTagForPlayer(i, playerid, 0);
                    }
                }
                PlayerInfo[playerid][pMask] = 1;
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s puts on a mask.", sendername);
                ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
            else if(PlayerInfo[playerid][pMask] == 1)
            {
                for(new i; i<MAX_PLAYERS; i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        ShowPlayerNameTagForPlayer(i, playerid, 1);
                    }
                }
                PlayerInfo[playerid][pMask] = 0;
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s Takes off their mask..", sendername);
                ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
        }
        return 1;
    }



Re: mask cmd - verlaj - 12.08.2013

you can also add

SetPlayerAttachedObject(playerid, 1, 19036, 2, 0.1, 0.0, 0.0, 90, 90, 0);
SetPlayerAttachedObject(playerid, 2, 19472, 2, 0.0, 0.1, 0.0, 90, 90, 0); // remove this if it looks odd

to attach a mask for the player


Re: mask cmd - GGW - 16.08.2013

well thanks all for helping but not that what i ask for i don't want make on the head i was cmd mask to hide the name