10.08.2013, 20:39
hi all , i'm trying to find a /mask cmd to hide the player name but i want it in strcmd so i hope you help me and thank you all have a nice day
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;
}