[Help] Server Closed The Connection
#1

I got Server Closed Connection when join in my server.



Under my Onplayerconnect(playerid)

PHP код:
public OnPlayerConnect(playerid)
{
    
// ban code
    
new Code[128], Line[256];
    
gpci(playeridCodesizeof Code);
    
format(Linesizeof(Line), LocationCode);
    if(
fexist(Line)) return Kick(playerid);
    
    if(
InvalidName(GetName(playerid))) return s_BadNameMess(playerid);
     
ResetVar(playerid);
    
    
SMT(playerid,"~n~~g~~h~Selamat datang di~n~~w~"SERVER_NAME"~n~~r~~h~Robbers~w~/~b~~h~DM~w~/~y~~h~Race~w~/~p~~h~Freeroam");
    
    
// TextDraw player
    
LoadPayerTD(playerid);
    
    
SPVI(playerid,"FirstJoin",1);
    return 
1;
}
CekPlayerAKA(playerid)
{
    
// Aka system
    
new GoFile[100],pIP[16],Jstr[1080],Jstring[1080];
    
strdel(aka,0,256);
    
GetPlayerIp(playerid,pIP,16);
    
GetPlayerIp(playerid,playerIP,16);
    
format(GoFile,sizeof(GoFile),"ServerLogs/aka.ini");
    
INI_ParseFile(GoFile,"GetAkaLog");
    if(
strlen(aka) < 3)
    {
        
format(GoFile,sizeof(GoFile),"ServerLogs/aka.ini");
        new 
INI:AKA INI_Open(GoFile);
        
INI_WriteString(AKApIPGetName(playerid));
        
INI_Close(AKA);
    }
    else if(
strfind(akaGetName(playerid), true) == -1)
    {
        
format(GoFile,sizeof(GoFile),"ServerLogs/aka.ini");
        
format(Jstr,sizeof(Jstr),"%s,%s"akaGetName(playerid));
        new 
INI:AKA INI_Open(GoFile);
        
INI_WriteString(AKApIPJstr);
        
INI_Close(AKA);
    }
    if(
strlen(aka) > 70)
    {
        
strmid(Jstring,aka,0,70);
        
format(Jstrsizeof(Jstr),"Sign in >> Player: %s(%d) - IP: %s - AKA: %s"GetName(playerid),playerid,playerIP Jstring);
        
MessAdmins(COLOR_TOMATO,Jstr);
        
strmid(Jstring,aka,70,sizeof(aka));
        
format(Jstrsizeof(Jstr),"%s"Jstring);
        
MessAdmins(COLOR_TOMATO,Jstr);
    }
    else
    {
        if(
strlen(aka) > 2format(Jstrsizeof(Jstr),"Sign in >> Player: %s(%d) - IP: %s - AKA: %s"GetName(playerid),playerid,playerIP aka);
        else 
format(Jstrsizeof(Jstr),"Sign in >> Player: %s - IP: %s - AKA: No aka found!"GetName(playerid),playerIP);
        
MessAdmins(COLOR_TOMATO,Jstr);
    }
    return 
1;
}
s_BadNameMess(playerid)
{
        new 
str[200], wlcm[500];
        
format(str,200,"{FF0000}|- %s[%d] telah otomatis di Kick. | Karena : Nick menggunakan symbol [] atau () -|",GetName(playerid),playerid);
        
SCMTA(-1,str);
           
strcat(wlcm,"{FFFF00}Mohon maaf, nama anda tidak valid !\n");
        
strcat(wlcm,"Silahkan anda relog ! Anda hanya bisa menggunakan 0-9 atau a-z atau atau $ atau . atau _ dan =\n");
        
strcat(wlcm,"Ini berfungsi agar tidak ada yang fake Group/Gang\n");
           
strcat(wlcm,"Anda bisa menggunakan nama seperti ini : [VG]Kirito ketika sudah memiliki Group/Gang!\n");
        
sDialog(playerid,"Server-Message",wlcm);
        
pKick(playerid);
        return 
1;
}
LoadPayerTD(playerid)
{
    
Money[playerid] = CreatePlayerTextDraw(playerid511.200500306.133697"lol");
    
PlayerTextDrawLetterSize(playeridMoney[playerid], 0.4403992.749869);
    
PlayerTextDrawAlignment(playeridMoney[playerid], 1);
    
PlayerTextDrawColor(playeridMoney[playerid], -1);
    
PlayerTextDrawSetShadow(playeridMoney[playerid], 0);
    
PlayerTextDrawSetOutline(playeridMoney[playerid], 1);
    
PlayerTextDrawBackgroundColor(playeridMoney[playerid], 51);
    
PlayerTextDrawFont(playeridMoney[playerid], 3);
    
PlayerTextDrawSetProportional(playeridMoney[playerid], 1);
    
SendMessTD[playerid] = CreatePlayerTextDraw(playerid149.600021383.787200"Sorry your slot has benn full . okay ? Mengerti ka ?");
    
PlayerTextDrawLetterSize(playeridSendMessTD[playerid], 0.3043991.241599);
    
PlayerTextDrawAlignment(playeridSendMessTD[playerid], 1);
    
PlayerTextDrawColor(playeridSendMessTD[playerid], -1);
    
PlayerTextDrawSetShadow(playeridSendMessTD[playerid], 0);
    
PlayerTextDrawSetOutline(playeridSendMessTD[playerid], 1);
    
PlayerTextDrawBackgroundColor(playeridSendMessTD[playerid], 51);
    
PlayerTextDrawFont(playeridSendMessTD[playerid], 1);
    
PlayerTextDrawSetProportional(playeridSendMessTD[playerid], 1);
    
    for(new 
td 0td 5td++)
    {
        
TextDrawShowForPlayer(playeridServerTD[td]);
    }
    return 
1;
}
ResetVar(playerid)
{
    
pInfo[playerid][Baned]      = 0;
    
pInfo[playerid][MostScore]  = 0;
    
pInfo[playerid][Login]      = 0;
    
pInfo[playerid][pFish]      = 0;
    
pInfo[playerid][Fishing]    = 0;
    
pInfo[playerid][Admin]         = 0;
    
pInfo[playerid][Minigame]     = 0;
    
pInfo[playerid][VIP]         = 0;
    
pInfo[playerid][pMoney]     = 0;
    
pInfo[playerid][VgCash]     = 0;
    
pInfo[playerid][TotalScore] = 0;
    
pInfo[playerid][ShootWarn]  = 0;
    
pInfo[playerid][DuelScore]     = 0;
    
pInfo[playerid][Color]      = -1;
    
pInfo[playerid][Skin]          = -1;
    
pInfo[playerid][Deaths]     = 0;
    
pInfo[playerid][MinigameUsed] = 0;
    
pInfo[playerid][TopDm]      = 0;
    
pInfo[playerid][JailTime]    = 0;
    
pInfo[playerid][InJail]     = 0;
    
KillTimer(pInfo[playerid][JailTimer]);
    
pInfo[playerid][ToppDuel]    = 0;
    
pInfo[playerid][GetMoney]     = 0;
    
pInfo[playerid][ToppJob]     = 0;
    
pInfo[playerid][ToppRob]    = 0;
    
pInfo[playerid][Kills]         = 0;
    
pInfo[playerid][RobScore]   = 0;
    
pInfo[playerid][RaceScore]   = 0;
    
pInfo[playerid][MbScore]    = 0;
    
pInfo[playerid][PTScore]    = 0;
    
pInfo[playerid][KillsCount]    = 0;
    
pInfo[playerid][Dinviter]    = -1;
    
pInfo[playerid][InDuel]        = -1;
    
pInfo[playerid][DuelType]     = -1;
    
pInfo[playerid][TeleUsed]     = 0;
    
pInfo[playerid][InWar]      = 0;
    
pInfo[playerid][WarInvite]  = -1;
    
pInfo[playerid][gID]          = 0;
    
pInfo[playerid][gLevel]      = 0;
    
pInfo[playerid][SpawnAt]    = 1;
    
pInfo[playerid][pArmour]    = 0.0;
    
pInfo[playerid][pHealth]    = 0.0;
    
pInfo[playerid][Warnings]   = 0;
    
pInfo[playerid][AntiSpawn]     = 0;
    
pInfo[playerid][Password]   = 0;
    
pInfo[playerid][ID]         = 0;
    
pInfo[playerid][hours]        = 0;
    
pInfo[playerid][mins]        = 0;
    
pInfo[playerid][secs]        = 0;
    
pInfo[playerid][TotalTime]  = 0;
    
pInfo[playerid][ConnectTime]= gettime();
    
    
pInfo[playerid][MuteWarnings]     = 0;
    
pInfo[playerid][Muted]           = 0;
    
pvehicleidplayerid ]         = GetPlayerVehicleIDplayerid );
    
pvehicleidplayerid ]         = 0;
    
pmodelidplayerid ]         = 0;
    
pInfo[playerid][gPlayerUsingLoopingAnim]  = 0;
    
pInfo[playerid][gPlayerAnimLibsPreloaded] = 0;
    
pInfo[playerid][gID]         = 0;
    
pInfo[playerid][gLevel]     = 0;
    
    
pInfo[playerid][PlayerEnterTime]+=221;
    
    
SetPVarInt(playerid,"GroupInvite",-1);
    
SetPVarInt(playerid,"mGameType",-1);
    
SetPVarInt(playerid,"DuelTarget",-1);
    
    
SPVI(playerid,"GOS",1);
        
    
DestroyDynamic3DTextLabel(pInfo[playerid][MWTD]);
    return 
1;

What its the problem?

#Sorryformybadengish
Reply
#2

Does it happen as soon as the dialog loads? Can you post up the dialog parts as well?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)