08.03.2014, 22:04
I have a big problem with cmd /maskon and /maskoff.
.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.
PHP код:
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, 0);
}
}
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;
}