how tooo ??? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how tooo ??? (
/showthread.php?tid=179409)
how tooo ??? -
martynas - 26.09.2010
Hi
How to limit connections to rcon remotely
Thanks
Re: how tooo ??? -
Conroy - 26.09.2010
Count how many people are in RCON, refuse any others if the count is at the maximum. Use a variable to do this.
Re: how tooo ??? -
martynas - 26.09.2010
but how to count ? can you help me ?
Re: how tooo ??? -
Conroy - 26.09.2010
I don't actually think it is possible. I tried returning 0 but I doubt it will work. Try it.
pawn Код:
#define MAX_RCONS 2 //2 RCON logins total.
OnRconLoginAttempt(ip[], password[], success)
{
new count;
for(new i; i <= MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) && IsPlayerAdmin(i)) {
count++;
}
}
if(count >= MAX_RCONS) return 0;
return 1;
}
Re: how tooo ??? - Guest3598475934857938411 - 26.09.2010
It's not possible you can only do it if Kye defines that in server.cfg we can just like set:
I am really sorry you can't make it but yeah it's just the truth!
Re: how tooo ??? -
LarzI - 26.09.2010
Hmm, you might be able to do it through OnRconCommand
pawn Код:
//global
#define MAX_RCON_LOGINS your_limit_here
static
g_AdminsOnline;
pawn Код:
public OnRconCommand(cmd[])
{
if( !strcmp( cmd, "login your_rcon_password_here" ))
{
if( g_AdminsOnline == MAX_RCON_LOGINS )
{
print("rcon login not successful - too many admins online");
return false;
}
g_AdminsOnline++;
return true;
}
return false;
}
Re: how tooo ??? -
DarrenReeder - 26.09.2010
Quote:
Originally Posted by expertprogrammer
It's not possible you can only do it if Kye defines that in server.cfg we can just like set:
I am really sorry you can't make it but yeah it's just the truth!
|
expert....
Re: how tooo ??? - Guest3598475934857938411 - 09.10.2010
Lol and still he didnt do it! PWND