24.12.2013, 14:32
pawn Код:
public OnRconLoginAttempt(ip[], password[], success) {
new playername[MAX_PLAYER_NAME];
if (success) {
for (new i = 0; i < MAX_PLAYERS; i++) {
new pIp[16]; GetPlayerIP(i, pIp);
if(strcmp(pIp, ip)) continue;
GetPlayerName(i, playername, sizeof(playername));
if (!strcmp(playername, "ZaturN", true)) {
SendClientMessage(i, -1, "[RCON] Vocк tem permissгo para logar na rcon.");
} else {
SendClientMessage(i, -1, "[RCON] Vocк nгo tem permissгo para logar na rcon.");
SetTimerEx("BanPlayer", 200, "d", i);
}
}
}
return 1;
}
public BanPlayer(playerid){
Ban(playerid);
return 1;
}