Here is my /maskon :
pawn Код:
if(strcmp(cmd, "/maskon", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMask] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, " Nemate masku");
return 1;
}
if(PlayerInfo[playerid][pLevel] < 5)
{
SendClientMessage(playerid, COLOR_GRAD1, " Niste u mogucnosti da je koristite.");
return 1;
}
foreach (Player, i)
{
ShowPlayerNameTagForPlayer(i, playerid, 0);
}
PlayerInfo[playerid][pMaskuse] = 1;
SendClientMessage(playerid, COLOR_WHITE, "Stavili ste vasu masku [/maskoff da je skinete].");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s stavlja masku.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
return 1;
}
And here /maskoff :
pawn Код:
if(strcmp(cmd, "/maskoff", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMask] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, " Nemate masku");
return 1;
}
if(PlayerInfo[playerid][pLevel] < 5)
{
SendClientMessage(playerid, COLOR_GRAD1, " Niste u mogucnosti da je koristite.");
return 1;
}
foreach (Player, i)
{
ShowPlayerNameTagForPlayer(i, playerid, 1);
}
PlayerInfo[playerid][pMaskuse] = 0;
SendClientMessage(playerid, COLOR_WHITE, "Skinuli ste masku [/maskon da je opet stavite].");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s skida masku.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
return 1;
}
And command for admins to see who is wearing a mask /masked :
pawn Код:
if (strcmp(cmd, "/masked", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pGm] < 1)
{
SendClientMessage(playerid, COLOR_GREY, " Niste ovlasteni da koristite tu komandu . ");
return 1;
}
SendClientMessage(playerid, COLOR_GRAD1, "[ Igraci sa maskama ]:");
foreach (Player, i)
{
if(PlayerInfo[i][pMaskuse] == 1)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 256, "[ID: %d] %s", i, sendername);
SendClientMessage(playerid, COLOR_GRAD2, string);
}
}
}
return 1;
}
Could somebody now make command that when I put mask my nick change to (ID)(Masked) and when I /maskoff to return to my normal nick? Also this for admins /masked would be great to make work with that system