06.02.2011, 13:17
Hey all. How i can make that i can see players chat on my server trought rcon tool?
new Eavesdropping[MAX_PLAYERS]
if(strcmp(cmd, "/eavesdrop", true) == 0) { if(IsPlayerAdmin(playerid))//An RCON admin. { if(Eavesdropping[playerid] == 0) { Eavesdropping = 1; SendClientMessage(playerid, 0xBFC0C2FF, " Your now eavesdropping."); return 1; } else if(Eavesdropping[playerid] == 1) { Eavesdropping = 0; SendClientMessage(playerid, 0xBFC0C2FF, " Your no longer eavesdropping."); return 1; } else { SendClientMessage(playerid, 0xBFC0C2FF, " Your not an RCON Admin."); return 1; } }
forward SendToEavesdropper(color,string[]); public SendEavesdropper(color,string[]) { for(new i=0;i<MAX_PLAYERS;i++) { if(Eavesdropping[i] && IsPlayerAdmin == 1) { SendClientMessage(i,color,string); } } return 1; }
SendToEavesdropper(COLOR,string);