Rcon (Lose connection) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Rcon (Lose connection) (
/showthread.php?tid=405565)
Rcon (Lose connection) -
Antonioh - 07.01.2013
When i login in the Rcon, i get kicked ''lose connection''
How to fix that
Re: Rcon (Lose connection) -
Dragonborn - 07.01.2013
Show the callback
OnRconLoginAttempt.
Re: Rcon (Lose connection) -
Antonioh - 07.01.2013
Quote:
}
}
public OnRconLoginAttempt(ip[], password[], success) {
new plip[MAX_PLAYER_IP], playerid;
foreach(Player, i) {
GetPlayerIp(i, plip, sizeof(plip));
if(strcmp(plip, ip) == 0) {
playerid = i;
}
}
if(success) {
if(PlayerInfo[playerid][pAdmin] < 9999 Kick(playerid);
} else {
if(RconAttempts[playerid] < 3) RconAttempts[playerid]++;
else Kick(playerid);
}
return 1;
}
public OnPlayerText(playerid, text[])
{
if(gPlayerLogged{playerid} != 1)
{
SendClientMessageEx(playerid, COLOR_RED, "You are not logged in.");
return 0;
}
|
Here
Re: Rcon (Lose connection) -
Dragonborn - 07.01.2013
Here's the problem :
pawn Код:
if(PlayerInfo[playerid][pAdmin] < 9999) Kick(playerid);
if the pAdmin of
playerid (you) is less than 9999, the player is kicked.