28.07.2014, 07:50
PHP код:
public OnPlayerText(playerid, text[])
{
if(GetPVarInt(playerid, "SPS Muted") == 0)
{
SetPVarInt(playerid, "SPS Messages Sent", GetPVarInt(playerid, "SPS Messages Sent") + 1);
SetTimerEx("SPS_Remove_Messages_Limit", 1500, 0, "i", playerid);
if(GetPVarInt(playerid, "SPS Messages Sent") >= 4)
{
if(!(((GetPVarInt(playerid, "SPS Spam Warnings") + 2) == 3)))
{
SendClientMessage(playerid, -1, ""chat""COL_LIGHTBLUE" Please, do not spam.");
}
SetPVarInt(playerid, "SPS Spam Warnings", GetPVarInt(playerid, "SPS Spam Warnings") + 1);
}
if(pInfo[playerid][pLogged] == 1)
{
new stringbig[356];
if(pInfo[playerid][IsPlayerMuted] == 1) {
SendClientMessage(playerid,-1,""chat" You are muted");
return 0;
}
if(team[playerid] == TEAM_HUMAN)
{
format(stringbig,sizeof(stringbig),""COL_WHITE"[GAME](%d): {FFFFFF}%s",playerid, text);
SendPlayerMessageToAll(playerid,stringbig);
}
if(team[playerid] == TEAM_ZOMBIE)
{
format(stringbig,sizeof(stringbig),""COL_WHITE"[GAME](%d): {FFFFFF}%s",playerid, text);
SendPlayerMessageToAll(playerid,stringbig);
}
{
SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 10000);
}
}
}
else
{
SendClientMessage(playerid, -1, ""chat""COL_LIGHTBLUE" You are muted, you can't talk.");
return 0;
}
return 0;
}
