25.06.2011, 17:52
This works
And this dont works:
I need that 2nd one because it showing the id of the player in main chat.. but then the spam kicker dont works
Код:
if (realchat) { new string [128]; new sendername[MAX_PLAYER_NAME]; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s Says %s", sendername, text); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); return 0; } if(GetPVarInt(playerid,"textspam") == 5) { new string[128]; new tname[MAX_PLAYER_NAME]; GetPlayerName(playerid,tname,sizeof(tname)); format(string,sizeof(string),"AdmCmd: %s was kicked by bot.. spamming", tname,playerid); SendClientMessageToAll(COLOR_RED,string); CallRemoteFunction("KickIncrease","d",playerid); Kick(playerid); } return 1; }
Код:
if (realchat == 0) { new string [128]; new sendername[MAX_PLAYER_NAME]; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "[%i] %s: %s", playerid, sendername, text); SendClientMessageToAll(GetPlayerColor(playerid),string); return 0; } if (realchat == 1) { new string [128]; new sendername[MAX_PLAYER_NAME]; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s Says %s", sendername, text); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); return 0; } if(GetPVarInt(playerid,"textspam") == 5) { new string[128]; new tname[MAX_PLAYER_NAME]; GetPlayerName(playerid,tname,sizeof(tname)); format(string,sizeof(string),"AdmCmd: %s was kicked by Bot.. spamming", tname,playerid); SendClientMessageToAll(COLOR_RED,string); CallRemoteFunction("KickIncrease","d",playerid); Kick(playerid); } return 1; }