Gamemodes
#1

Can i do 2 gamemodes in my server.cfg ? the one gamemode is for my rcon login?
Reply
#2

You can't run two gamemodes at the same time. You can however I believe have them alternate when the server is restarted. This is useful for servers that have different gamemodes like hungergames, cops and robbers, etc. But if you want to run truly more than one script at once you need to use a filterscript alongside your gamemode.
Reply
#3

Because everytime i rcon login i get banned
Reply
#4

Show us your OnRconLoginAttempt.
Reply
#5

Quote:
Originally Posted by Stinged
Посмотреть сообщение
Show us your OnRconLoginAttempt.
Код:
public OnRconLoginAttempt(ip[], password[], success)
{
	if(success)
	{
		new pip[16];
		////foreach(Player,i)
        for(new i; i<MAX_PLAYERS; i++)
		{
			GetPlayerIp(i, pip, sizeof(pip));
			if(!strcmp(ip, pip, true))
			if(PlayerInfo[i][pAdmin] < 3) Ban(i);
		}
	}
}
I need to recompile it but the pawn in linux didnt work
Reply
#6

Quote:
Originally Posted by VinHanako
Посмотреть сообщение
I need to recompile it but the pawn in linux didnt work
Your problem lies
Код:
if(PlayerInfo[i][pAdmin] < 3) Ban(i);
there.


When you start the gamemode, go ingame, login, logout, set your admin to 3+ in the database, and login again.

Then you should be able to login via rcon.
Reply
#7

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
Your problem lies
Код:
if(PlayerInfo[i][pAdmin] < 3) Ban(i);
there.


When you start the gamemode, go ingame, login, logout, set your admin to 3+ in the database, and login again.

Then you should be able to login via rcon.
Can you help me to compile it to your pawn ? because in linux i cant compile it D:
Reply
#8

Quote:
Originally Posted by VinHanako
Посмотреть сообщение
Код:
public OnRconLoginAttempt(ip[], password[], success)
{
	if(success)
	{
		new pip[16];
		////foreach(Player,i)
        for(new i; i<MAX_PLAYERS; i++)
		{
			GetPlayerIp(i, pip, sizeof(pip));
			if(!strcmp(ip, pip, true))
			if(PlayerInfo[i][pAdmin] < 3) Ban(i);
		}
	}
}
I need to recompile it but the pawn in linux didnt work
Hi.

Your codes isn't valid.
This line:
Код:
if(PlayerInfo[i][pAdmin] < 3) Ban(i);
It's problem, when a user attemps for login into rcon, server can't check their information, or fetch from sql or anywhere.


HaveFun!
Reply
#9

Quote:
Originally Posted by YaQi
Посмотреть сообщение
Hi.

Your codes isn't valid.
This line:
Код:
if(PlayerInfo[i][pAdmin] < 3) Ban(i);
It's problem, when a user attemps for login into rcon, server can't check their information, or fetch from sql or anywhere.


HaveFun!
Can i have a favor to recompile my script ? Because the pawn didnt work to me D"
Reply
#10

Quote:
Originally Posted by YaQi
Посмотреть сообщение
It's problem, when a user attemps for login into rcon, server can't check their information, or fetch from sql or anywhere.
Incorrect.

It's actually a secure way of making sure no-one can simply login with the RCON password without being on an admin account.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)