A problem when connect to the server.
#1

hello .
I have noticed that there's a new version [0.3z]
and I wanted to update my mode to this verison but when I have updated it I found a problem in the connection to game. just wanted to let you know I didn't touch the mode for something like a half year!.
When I'm connecting to the server after I ran the samp_server, I get server closed the connection.

Joining the game...
and then Server closed the connection...

Код:
public OnPlayerConnect(playerid)
{
print("POLO 1");
//if(IsPlayerNPC(playerid)) return SpawnPlayer(playerid);
if(!IsPlayerNPC(playerid))
{
	if(strfind(PlayerName[playerid],"_",true) == -1) return SendClientMessage(playerid,color_error, "ERROR: Your name must be in the format Firstname_Lastname."),Kick(playerid);
}
new string[512], n[MAX_PLAYER_NAME];
SetPlayerColor(playerid,0xC9C9C900);
GetPlayerName(playerid,n,sizeof(n));
format(string, sizeof(string), "** %s has joined the server. ", n);
SendNormalMessage(30,playerid,color_text,string);
format(string, sizeof(string), "%s(%d) has joined the server",n,playerid);
WriteLog("Connects",string);
SetPlayerWeather(playerid,10);
new playername[MAX_PLAYER_NAME],IP[32];
GetPlayerIp(playerid,IP,32);
GetPlayerSpaceName(playerid,playername,MAX_PLAYER_NAME);
format(PlayerName[playerid],MAX_PLAYER_NAME,"%s",playername);
firstlog[playerid] = false;
logged[playerid] = false;
Query("SELECT `ID` FROM `%s` WHERE `Name`='%s' AND `Active`='1' OR `IP`='%s' AND `Active`='1'", BanT, playername,IP);
new num = mysql_num_rows();
print("POLO 2");
if(num >= 1 && num <= 50)
{
	new Result[30],i;
	mysql_fetch_row(Result);
	i = strval(Result);
    SendClientMessage(playerid,color_red,"[SERVER]: You are banned from our server.");
    set(string,"* Reason: %s.",mysql_Get(BanT,i,"Reason"));
    SendClientMessage(playerid,color_red,string);
    set(string,"* Date: %s.",mysql_Get(BanT,i,"Time"));
    SendClientMessage(playerid,color_red,string);
    Kick(playerid);
    return 1;
}
print("POLO 3");
Query("SELECT `ID` FROM `%s` WHERE `Name`='%s'", UserT, playername);
if(mysql_num_rows())
{
	new Result[30];
	mysql_fetch_row(Result);
	TID[playerid] = strval(Result);
	return 1;
}
print("POLO 4");
return 1;
}
Reply


Messages In This Thread
A problem when connect to the server. - by Gennum. - 08.05.2014, 14:35
Re: A problem when connect to the server. - by Konstantinos - 08.05.2014, 14:38
Re: A problem when connect to the server. - by Gennum. - 08.05.2014, 14:51
Re: A problem when connect to the server. - by Konstantinos - 08.05.2014, 14:54
Re: A problem when connect to the server. - by Gennum. - 08.05.2014, 14:57
Re: A problem when connect to the server. - by BroZeus - 08.05.2014, 14:57
Re: A problem when connect to the server. - by Gennum. - 08.05.2014, 15:15

Forum Jump:


Users browsing this thread: 3 Guest(s)