Problem mask
#1

I have a big problem with cmd /maskon and /maskoff.
PHP код:
CMD:maskon(playeridparams[])
{
        new 
string[120];
        if(
IsPlayerConnected(playerid))
        {
            if(
PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
            {
              for(new 
0MAX_PLAYERSi++)
                 {
                     if(
IsPlayerConnected(i))
                     {
                         
ShowPlayerNameTagForPlayer(iplayerid0);
                      
SetPlayerMarkerForPlayer(iplayerid0xFFFFFF00);
                  }
              }
              
PlayerInfo[playerid][pMaskuse] = 1;
              
SendClientMessage(playeridCOLOR_2"Ti-ai pus Masca ! [/maskoff] ca sa o scoti.");
              
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s si-a pus masca."sendername);
              return 
TeamChatHit(string);
            }
        }
        return 
1;
}
CMD:maskoff(playeridparams[])
{
new 
string[120];
        if(
IsPlayerConnected(playerid))
        {
            if(
PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
            {
            for(new 
0MAX_PLAYERSi++)
               {
                   if(
IsPlayerConnected(i))
                   {
                       
ShowPlayerNameTagForPlayer(iplayerid1);
                       
SetPlayerMarkerForPlayer(iplayerid0);
                }
            }
            
PlayerInfo[playerid][pMaskuse] = 0;
            
SendClientMessage(playeridCOLOR_2"Ti-ai scos Masca ! [/maskon] ca sa o pui la loc.");
            
GetPlayerName(playeridsendernamesizeof(sendername));
              
format(stringsizeof(string), "* %s si-a scos masca."sendername);
              return 
TeamChatHit(string);
            }
        }
        return 
1;

.When i use /maskon the cmd good work but when i use cmd: /maskoff it set my name color to black, not white how it should work normally.
Reply
#2

pawn Код:
CMD:maskon(playerid, params[])
{
        new string[120];
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
            {
              for(new i = 0; i < MAX_PLAYERS; i++)
                 {
                     if(IsPlayerConnected(i))
                     {
                         ShowPlayerNameTagForPlayer(i, playerid, 0);
                      SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00);
                  }
              }
              PlayerInfo[playerid][pMaskuse] = 1;
              SendClientMessage(playerid, COLOR_2, "Ti-ai pus Masca ! [/maskoff] ca sa o scoti.");
              GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s si-a pus masca.", sendername);
              return TeamChatHit(string);
            }
        }
        return 1;
}
CMD:maskoff(playerid, params[])
{
new string[120];
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
            {
            for(new i = 0; i < MAX_PLAYERS; i++)
               {
                   if(IsPlayerConnected(i))
                   {
                       ShowPlayerNameTagForPlayer(i, playerid, 1);
                       SetPlayerMarkerForPlayer(i, playerid, 00);
                       SetPlayerColor(playerid, 0xFFFFFFFF);
                }
            }
            PlayerInfo[playerid][pMaskuse] = 0;
            SendClientMessage(playerid, COLOR_2, "Ti-ai scos Masca ! [/maskon] ca sa o pui la loc.");
            GetPlayerName(playerid, sendername, sizeof(sendername));
              format(string, sizeof(string), "* %s si-a scos masca.", sendername);
              return TeamChatHit(string);
            }
        }
        return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)