23.12.2011, 19:19
Quote:
1) I only know rcon password
2) How can protection, just log on to my name? |
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
if(!sucess) return 1; //If they failed, just ignore it - they can't do anything wrong.
new pip[16], pName[24];
for(new i=0; i<MAX_PLAYERS; i++) //Loop through all players
{
GetPlayerIp(i, pip, sizeof(pip));
if(!strcmp(ip, pip, true)) //If a player's IP is the IP that logged in
{
GetPlayerName(i, pName, 24);
if(strcmp(pName, "Cpt.Shady")) //Only you
{
SendClientMessage(playerid, 0xFF00FFFF, "You are not Cpt.Shady! Bye.");
Kick(i);
}
}
}
return 1;
}