13.08.2011, 11:02
add this
and this
write here if this doesnt work..
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPVarInt(playerid, "Muted", 1);
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPVarInt(playerid, "Muted", 0);
return 1;
}
pawn Код:
public OnPlayerText(playerid, text[])
{
if(GetPVarInt(playerid, "Muted") == 1)
{
SendClientMessage(playerid, red, "You are muted, you cannot talk.");
return 0;
}
else if(GetPVarInt(playerid, "Muted") == 0)
{
new
szText[128],
szPlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, szPlayerName, sizeof(szPlayerName));
format(szText, sizeof(szText), "%s: {FFFFFF}%s", szPlayerName, text);
SendClientMessageToAll(GetPlayerColor(playerid), szText);
return 0;
}
return 1;
}