mask cmd
#5

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;
    }
Reply


Messages In This Thread
mask cmd - by GGW - 10.08.2013, 20:39
Re: mask cmd - by GGW - 11.08.2013, 12:53
Re: mask cmd - by Mattakil - 11.08.2013, 15:53
Re: mask cmd - by GGW - 12.08.2013, 01:38
Re: mask cmd - by JeaSon - 12.08.2013, 01:41
Re: mask cmd - by verlaj - 12.08.2013, 01:45
Re: mask cmd - by GGW - 16.08.2013, 15:10

Forum Jump:


Users browsing this thread: 1 Guest(s)