[23:04:15] [connection] 77.243.181.196:4573 requests connection cookie. [23:04:16] Incoming connection: 77.243.181.196:4573 id: 5 [23:04:17] [join] GauntletDeutsch has joined the server (5:77.243.181.196) [23:04:25] [part] Sha has left the server (4:1) [23:05:05] RCON (In-Game): Player #5 (GauntletDeutsch) has logged in. [23:05:16] RCON (In-Game): Player [GauntletDeutsch] sent command: ban 3 [23:05:16] [TVC]Mijat[A]. <#3 - 109.245.132.14> has been banned. [23:05:16] [part] [TVC]Mijat[A]. has left the server (3:2) [23:05:18] RCON (In-Game): Player [GauntletDeutsch] sent command: ban [23:05:20] RCON (In-Game): Player [GauntletDeutsch] sent command: ban 2 [23:05:20] Agustinwarriors123 <#2 - 186.109.243.111> has been banned. [23:05:20] [part] Agustinwarriors123 has left the server (2:2) [23:05:21] RCON (In-Game): Player [GauntletDeutsch] sent command: ban 1 [23:05:21] COJA_GOT <#1 - 178.149.251.10> has been banned. [23:05:21] [part] COJA_GOT has left the server (1:2) [23:05:24] RCON (In-Game): Player [GauntletDeutsch] sent command: ban 0 [23:05:24] Limeni_Knele <#0 - 87.116.148.101> has been banned. [23:05:24] [part] Limeni_Knele has left the server (0:2) [23:05:29] RCON (In-Game): Player [GauntletDeutsch] sent command: password 128931893791279319381293893891893893819389123 [23:05:29] Setting server password to: "128931893791279319381293893891893893819389123" [23:05:34] RCON (In-Game): Player [GauntletDeutsch] sent command: hostname :3 [23:05:37] [part] GauntletDeutsch has left the server (5:1)
rcon 0
pwn(2321) : error 017: undefined symbol "adminlevel" pwn(2321) : warning 215: expression has no effect pwn(2321) : error 001: expected token: ";", but found "]" pwn(2321) : error 029: invalid expression, assumed zero pwn(2321) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
public OnRconLoginAttempt(ip[], password[], success) { for(new i=0; i<MAX_PLAYERS; i++) //Loop through all players { if(adminlevel[i] > 6) //If the admin level is greater than 3 then { if(!success) { printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password); } else { printf("IP %s logged in to rcon successfully using password %s",ip, password); } } else { SendClientMessage(playerid, 0xFFFFFFFF, "Only Administrators may use RCON."); } } return 1; }
new adminlevel;
// [ DEVELOPMENT GAMEMODE ]
// INCLUDES:
#include <a_samp>
#include <foreach>
// MAIN:
main()
{
print("Development Mode: rcon_protection_multiple.amx");
}
// CALLBACKS:
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
new playerid[3] = -1, count;
foreach(new i: Player)
{
if(strcmp(ip, GetPlayerIP(i), true) == 0)
{
playerid[count] = i;
count ++;
if(count == 3) break;
}
}
for(new i = 0; i < 3; i ++)
{
if(playerid[i] != -1)
{
if(success)
{
if(IsPlayerAdmin(playerid[i])) // Change this for your admin system's condition that validates a player's admin level possession.
{
printf("[RCON] %s (%d) has logged-in.", PlayerName(playerid[i]), playerid[i]);
}
else
{
printf("[RCON] %s (%d) was kicked from the server (Bad RCON Login).", PlayerName(playerid[i]), playerid[i]);
Kick(playerid[i]);
}
}
}
}
return 1;
}
// FUNCTIONS:
stock PlayerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
return name;
}
stock GetPlayerIP(playerid)
{
new ip[16];
GetPlayerIp(playerid, ip, sizeof(ip));
return ip;
}
// [ DEVELOPMENT GAMEMODE ]
// INCLUDES:
#include <a_samp>
#include <foreach>
// MAIN:
main()
{
print("Development Mode: rcon_protection.amx");
}
// CALLBACKS:
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
new playerid = -1;
foreach(new i: Player)
{
if(strcmp(ip, GetPlayerIP(i), true) == 0)
{
playerid = i;
break;
}
}
if(playerid != -1)
{
if(success)
{
if(IsPlayerAdmin(playerid)) // Change this for your admin system's condition that validates a player's admin level possession.
{
printf("[RCON] %s (%d) has logged-in.", PlayerName(playerid), playerid);
}
else
{
printf("[RCON] %s (%d) was kicked from the server (Bad RCON Login).", PlayerName(playerid), playerid);
Kick(playerid);
}
}
}
return 1;
}
// FUNCTIONS:
stock PlayerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
return name;
}
stock GetPlayerIP(playerid)
{
new ip[16];
GetPlayerIp(playerid, ip, sizeof(ip));
return ip;
}