09.03.2012, 05:26
pawn Код:
new masked[MAX_PLAYERS];
CMD:mask(playerid, params[])
{
if(masked[playerid] == 0)
{
masked[playerid] = 1;
SendClientMessage(playerid, -1,"You are now masked.");
}
else
{
masked[playerid] = 0;
SendClientMessage(playerid, -1,"You are no longer masked.");
}
return 1;
}
OnPlayerText(playerid, text[])
{
if(masked[playerid] == 1)
{
new string[128];
format(string, sizeof(string),"A Stranger says: %s", text);
SendClientMessageToAll(-1, string);
}
else
{
new string[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string),"%s says: %s", name, text);
SendClientMessageToAll(-1, string);
}
return 0;
}