rcon kick - 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 kick (
/showthread.php?tid=246647)
rcon kick -
dud - 05.04.2011
i use this script for rcon but its work if player is Admin_Admin he can login on rcon but evry else player on server get kick i dont want evryplayer be kicked
i try lot of way to fix it but cant
so someone know how to do this?
Код:
public OnRconLoginAttempt(ip[], password[], success)
{
if(success)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
new Playername[24];
GetPlayerName(i, Playername, sizeof(Playername));
if(strcmp(Playername,"Admin_Admin",true))
{
Kick(i);
}
}
}
Re: rcon kick -
[DJ]Boki - 05.04.2011
re-download the server,remove any type of admin you use,and connect in server,type rcon login password,than type /kick or /ban
Re: rcon kick -
Eiy Mard - 19.06.2012
there get auto banned ... better there get ban ...
Код HTML:
public OnRconLoginAttempt(ip[], password[], success)
{
if(!success) //If the password was incorrect
{
printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);
new pip[16];
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 failed the login
{
SendClientMessageToAll(0xFFFFFFFF," Banned EVADING, reason: RconLoginAttempt");
PlayerPlaySound(i, 1141, 0.0, 0.0, 0.0);
Ban(i); //They are now banned.
}
}
}
return 1;
}