Only one player can see login screen
#1

I have already posted this on another forum, but we didn't fix it.
So here is the thing, i am noob at scripting so i downloaded cool gamemode on some site, it is posted 4 years ago so i cant contact the author, and server seems to be "locked" for only one player, becuase if someone else try to join, they don't see login screen (but sees the chat) and because of that they cant play.
So can someone tell me where to look in gamemode file, i mean it has over 40k rows.

Here is the OnPlayerConnect line, is somewhere here limit setted to 1?

Код:
public OnPlayerConnect(playerid)
{
if(ServerInfo[isHH] == 1)
{
TextDrawShowForPlayer(playerid, HHours);
}
//zlatara
    new ConnIP[16];
	GetPlayerIp(playerid,ConnIP,16);
	new compare_IP[16];
	new number_IP = 0;
	for(new i=0; i<MAX_PLAYERS; i++) {
		if(IsPlayerConnected(i)) {
		    GetPlayerIp(i,compare_IP,16);
		    if(!strcmp(compare_IP,ConnIP)) number_IP++;
		}
	}
	if((GetTickCount() - Join_Stamp) < Time_Limit)
	    exceed=1;
	else
	    exceed=0;
 	if(strcmp(ban_s, ConnIP, false) == 0 && exceed == 1 )
 	{
 	    Same_IP++;
 	    if(Same_IP > SAME_IP_CONNECT)
 	    {
	   		Kick(playerid);
 			Same_IP=0;
 	    }
 	}
 	else
 	{
 		Same_IP=0;
	}
	if(number_IP > IP_LIMIT)
    Ban(playerid);
	GetStampIP(playerid);
    new plname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, plname, sizeof(plname));
	if(Security != 0)
	{
	    SendClientMessage(playerid, COLOR_YELLOW, "Domacin je prekrsio jedan od pravila sporazuma, preduzete su mere!");
	    Kick(playerid);
	    return 1;
	}
	new hIme[MAX_PLAYER_NAME];
	ImeIgraca(playerid, hIme);
	new name[MAX_PLAYER_NAME];
    new string[256];
    new ippp[24];
	GetPlayerIp(playerid, ippp, 24);
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "Igrac: %s |ID: %d |IP: %s | se ulogovao na server *****", name, playerid,ippp );
    PosaljiVlasniku(0xFFFF80C8, string);
	//////////////////////////////////////////////////////////////////////////////////////////
/*	if(!IsValidRpName(hIme) && strcmp(hIme, "LockeR") && strcmp(hIme, "Amir") && strcmp(hIme, "Janjic"))
	{
	    new string[512];
		format(string, 512, "{FF0000}Vase ime nije u pravilnom formatu.\n\n{FFFF00}\
							 Kako se ovo ne bi u buducnosti dogadjalo, procitajte kako Vase ime treba da izgleda:\n\n\
							 - Vase ime mora biti u formatu {FFFFFF}Ime_Prezime {FFFF00}i obavezno mora sadrzati donju crtu.");
		ShowPlayerDialog(playerid, DIALOG_KRIVOIME , DIALOG_STYLE_MSGBOX, "{FF0000}F{FFFFFF}C{C0C0C0}RL", string, "Zatvori", "");
		return 1;
	}*/
	
 	if(!ProveraRPImena(playerid))
    {
    new pname[MAX_PLAYER_NAME];
    if(strcmp(pname,"LockeR",false))
	{
	    StatusKonekta(playerid, 2);
		return 1;
	}
    }
Also i found this, this is login/register screen:

Код:
forward LogReg(playerid);
public LogReg(playerid)
{
	KillTimer(LogRegTimer[playerid]); g_SetPlayerHealth(playerid, 99.0); SetPlayerVirtualWorld(playerid, 0); SetPlayerInterior(playerid, 0);
	SetTimerEx("PostaviKameru",100, false, "i", playerid);
	/////////////////////////////////////////////////////////////////////////////////////
	if(fexist(Korisnici(playerid)))
	{
    TextDrawShowForPlayer(playerid,RegLogi[10]);//Prijava
    TextDrawShowForPlayer(playerid,RegLogi[11]);//Registacija
    TextDrawShowForPlayer(playerid,RegLogi[12]); //info
    TextDrawShowForPlayer(playerid,GSROLEPLAY); //BG BY 
    TextDrawShowForPlayer(playerid,Traka1);
    TextDrawShowForPlayer(playerid,Traka2);
    TextDrawShowForPlayer(playerid,NAPRED);
    TextDrawShowForPlayer(playerid,loginlinija1);
    TextDrawShowForPlayer(playerid,loginlinija2);
    SelectTextDraw(playerid, BELA2);
	}
	else
	{
    TextDrawHideForPlayer(playerid,Intro[0]); TextDrawHideForPlayer(playerid,Intro[1]); TextDrawHideForPlayer(playerid,Intro[2]);
    TextDrawHideForPlayer(playerid,Intro[3]); TextDrawHideForPlayer(playerid,Intro[4]); TextDrawHideForPlayer(playerid,Intro[5]);
    TextDrawHideForPlayer(playerid,Intro[6]); TextDrawHideForPlayer(playerid,Intro[7]); TextDrawHideForPlayer(playerid,Intro[8]);
    TextDrawHideForPlayer(playerid,Intro[9]); TextDrawHideForPlayer(playerid,Intro[10]);
    if(ServerInfo[isRegistracija] == 1)
    {
	 StatusKonekta(playerid, 5);
	}
	else if(ServerInfo[isRegistracija] != 1)
	{
   	TextDrawShowForPlayer(playerid,RegLogi[10]);//Prijava
   	TextDrawShowForPlayer(playerid,RegLogi[11]);//Registacija
   	TextDrawShowForPlayer(playerid,RegLogi[12]); //info
   	TextDrawShowForPlayer(playerid,GSROLEPLAY); //BG BY 
    TextDrawShowForPlayer(playerid,Traka1);
    TextDrawShowForPlayer(playerid,Traka2);
    TextDrawShowForPlayer(playerid,NAPRED);
     TextDrawShowForPlayer(playerid,loginlinija1);
      TextDrawShowForPlayer(playerid,loginlinija2);
   	SelectTextDraw(playerid, BELA2);
	}
  }
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)