Mask for donaters
#1

Hello, I'm trying to make a system allowing masks for free whenever the player wants to use it. This is the mask script I'm using:
pawn Код:
if(strcmp(cmd, "/maskon", true) == 0)
    {
      if(IsPlayerConnected(playerid))
      {
        if(PlayerInfo[playerid][pMask] == 0)
            {
               SendClientMessage(playerid, COLOR_GREY, "[Error:] You do not have a mask");
               return 1;
            }
            if(PlayerInfo[playerid][pLevel] < 5)
        {
                SendClientMessage(playerid, COLOR_GREY, "[Error:] You are not at the required level to use this command");
            return 1;
        }
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
            if(IsPlayerConnected(i))
            {
                    ShowPlayerNameTagForPlayer(i, playerid, 0);
                }
            }
            PlayerInfo[playerid][pMaskuse] = 1;
            SendClientMessage(playerid, COLOR_WHITE, "[Info:] You have put your mask on");
            GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "%s puts a mask on", sendername);
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        }
        return 1;
    }
I've come with far:
pawn Код:
if(strcmp(cmd, "/dmask", true) == 0)
    {
      if(IsPlayerConnected(playerid))
      {
        if(PlayerInfo[playerid][pMask] == 0)
            {
               SendClientMessage(playerid, COLOR_GREY, "[Error:] You do not have a mask");
               return 1;
            }
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
            if(IsPlayerConnected(i))
            {
                    ShowPlayerNameTagForPlayer(i, playerid, 0);
                }
            }
            PlayerInfo[playerid][pMaskuse] = 1;
            SendClientMessage(playerid, COLOR_WHITE, "[Info:] You have put your mask on");
            GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "%s puts a mask on", sendername);
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        }
        return 1;
    }
I appreciate any helpful answers.
Reply


Messages In This Thread
Mask for donaters - by Galcio - 30.11.2009, 18:21
Re: Mask for donaters - by dice7 - 30.11.2009, 18:29
Re: Mask for donaters - by Galcio - 30.11.2009, 18:36
Re: Mask for donaters - by lolumadd - 30.11.2009, 18:43
Re: Mask for donaters - by Galcio - 30.11.2009, 18:57
Re: Mask for donaters - by [NYRP]Mike. - 30.11.2009, 18:59
Re: Mask for donaters - by Galcio - 30.11.2009, 19:06

Forum Jump:


Users browsing this thread: 1 Guest(s)