SA-MP Forums Archive
Gamemodes - 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: Gamemodes (/showthread.php?tid=609047)



Gamemodes - VinHanako - 08.06.2016

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


Re: Gamemodes - BornHuman - 08.06.2016

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.


Re: Gamemodes - VinHanako - 08.06.2016

Because everytime i rcon login i get banned


Re: Gamemodes - Stinged - 08.06.2016

Show us your OnRconLoginAttempt.


Re: Gamemodes - VinHanako - 08.06.2016

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


Re: Gamemodes - Sew_Sumi - 08.06.2016

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.


Re: Gamemodes - VinHanako - 08.06.2016

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:


Re: Gamemodes - YaQi - 08.06.2016

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!


Re: Gamemodes - VinHanako - 08.06.2016

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"


Re: Gamemodes - Sew_Sumi - 08.06.2016

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.