Script not responding
#1

My script just stopped responding, it shows no error/warnings and the console shows no error as well, I have crashdetect and nativechecker installed, I get no errors/warnings as well. The last thing I added to the script was a discord system script was working fine after I had finished installing the script, I then close the server and went to sleep, the other morning I woke up I saw an afk include I added it and when I tried to test it and that's when I noticed that the script was not responding after the player logs in, I then removed the afk system thinking it was the problem. When I removed it the problem still continues. Anyone know what could have caused this?

I will be looking out for responses
Reply
#2

bump
Reply
#3

That plugin isn't always stable.

Did you add discord_bot_token into server.cfg?
Reply
#4

Quote:
Originally Posted by CJ101
Посмотреть сообщение
That plugin isn't always stable.

Did you add discord_bot_token into server.cfg?
Yes, I added this and the server.cfg and the bot worked perfectly as I have mentioned above. I think it's the plugin too, so I'll just remove the bot system, for now, to see if that's really the issue.
Reply
#5

bump

Update I removed the discord system and the server won't respond at OnPlayerRequestSpawn, in other words, the server loaded up until the skin selection, at the skin selection I cant skip through the skins or spawn. I don't know why?
Reply
#6

Show the code that executes after logging in. As well as OnPlayerRequestSpawn/OnPlayerRequestClass.

Have you confirmed that your "script stopped responding" (in other words, your server; which can be the case of an infinite loop somewhere) or if it's merely an issue with the process of logging in and spawning (where the server isn't actually frozen or anything of the sort)?
Reply
#7

Quote:
Originally Posted by CantBeJohn
Посмотреть сообщение
Show the code that executes after logging in. As well as OnPlayerRequestSpawn/OnPlayerRequestClass.

Have you confirmed that your "script stopped responding" (in other words, your server; which can be the case of an infinite loop somewhere) or if it's merely an issue with the process of logging in and spawning (where the server isn't actually frozen or anything of the sort)?
PHP код:
public OnPlayerRequestClass(playeridclassid)
{
/*    SetPlayerPos(playerid,2182.4800,1285.8407,42.9785);
    SetSpawnInfo(playerid, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0);
    TogglePlayerSpectating(playerid, true);
    TextDrawShowForPlayer(playerid, Textdraws[0]);
    TextDrawShowForPlayer(playerid, Textdraws[1]);
    TextDrawShowForPlayer(playerid, Textdraws[2]);
    TextDrawShowForPlayer(playerid, Textdraws[3]);
    SelectTextDraw(playerid, 0xA3B4C5FF);
*/
    
SetPlayerTeamFromClass(playeridclassid);
    return 
1;
}
// for the comments above, i used them when i had built a custom class selection system but its now removed. 
PHP код:
function SetPlayerTeamFromClass(playeridclassid)
{
    switch(
classid)
    {
        case 
.. 2:
        {
            
GameTextForPlayer(playerid,"~p~ Clans Man Gang",1000,3);
            
tInfo[playerid][Team] = TEAM_CLANSMAN;
        }
         case 
.. 5:
        {
            
GameTextForPlayer(playerid,"~y~ G-City",1000,3);
            
tInfo[playerid][Team] = TEAM_GCITY;
        }
           case 
.. 9:
        {
            
GameTextForPlayer(playerid,"~b~ Babilon",1000,3);
            
tInfo[playerid][Team] = TEAM_POLICE;
        }
          case 
10 .. 12:
        {
            
GameTextForPlayer(playerid,"~r~ VIP",1000,3);
            
tInfo[playerid][Team] = TEAM_VIP;
        }
    }
    
SetPlayerCameraPos(playerid2168.91701285.301847.4067);
    
SetPlayerCameraLookAt(playerid2169.91991285.352947.0267);
    
SetPlayerPos(playerid,2181.4541,1285.5052,42.8728);
    
SetPlayerFacingAngle(playerid89.9141);

PHP код:

//logging in the player here
function LoadAcc(playerid)
{
    
INI_ParseFile(IPPath(playerid), "LoadIPBan_%s", .bExtra true, .extra playerid);
    
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
    
NameCheck(playerid);
    
AddAcc(playerid);
    if(
fexist(UserPath(playerid)))
    {
        if(!
strcmp(RPIP(playerid), pInfo[playerid][pIP]))
        {
            new 
yearmonthdayhourminssecstring[64];
            
getdate(yearmonthday);
            
gettime(hour,mins,sec);
            
format(string40,"%d/%d/%d at %d:%d:%d"day,month,year,hour,mins,sec);
            new 
INI:File INI_Open(UserPath(playerid));
            
INI_SetTag(File,"data");
            
INI_WriteString(File,"LastOn",string);
            
INI_Close(File);
             
BanCheck(playerid);
            if(
tInfo[playerid][ClearLog] == 0)
            {
                
SendClientMessage(playerid,COL_NOTIFY,"Your account has been automatically logged in.");
                if(
IsPlayerStaff(playerid))
                {
                      
SendServerMSG(COL_LIGHTGREY,"[CONNECTED]: %s(ID:%i) has joined the server. [%i/%i]"ReturnPlayerName(playerid),playerid,CountPlayers(),MAX_CUR_PLAYERS);
                    
SendClientMSG(playerid,COL_YELLOW,"You have been logged in as a level %i administrator. Welcome Back!!",pInfo[playerid][Admin]);
                }
                else
                {
                    foreach(new 
iPlayer)
                    {
                        if(
IsPlayerStaff(i))
                        {
                            
SendClientMSG(i,COL_LIGHTGREY,"[CONNECTED]: %s(ID:%i) has joined the server. (IP: %s) [%i/%i]"ReturnPlayerName(playerid),playerid,RPIP(playerid),CountPlayers(),MAX_CUR_PLAYERS);
                        }
                        else
                        {
                            
SendClientMSG(i,COL_LIGHTGREY,"[CONNECTED]: %s(ID:%i) has joined the server [%i/%i]"ReturnPlayerName(playerid),playerid,CountPlayers(),MAX_CUR_PLAYERS);
                        }
                    }
                }
                  
SendClientMessage(playerid,-1,"{F52C2C}=========================================================");
                
SendClientMSG(playerid,-1,"{F52C2C}[MOTD]:{D17777} %s",MOTDInfo[MOTDstr]);
                
SendClientMessage(playerid,-1,"{F52C2C}=========================================================");
                if(
pInfo[playerid][Email] == 0)
                {
                    
SendClientMessage(playerid,COL_NOTIFY,"Your account doesn't have an assigned Email Address. Use /assignemail to link one to this account.");
                    
SendClientMessage(playerid,COL_NOTIFY,"This Email Address will only be used for account recovery purposes ONLY.");
                }
                
HideWelcomeTXD(playerid);
                
ShowPlayerTextdraws(playerid);
                
SetPlayerScore(playeridpInfo[playerid][Score]);
               }
        }
        else
          {
            
InterpolateCameraPos(playerid1177.1447751243.40600549.8457832170.2109371284.39721644.55846745000);
            
InterpolateCameraLookAt(playerid1182.1140131243.84277350.1861452175.1882321284.80187944.30857445000);
            new 
dialog[180];
            new 
string[400];
            
strcat(string""COL_WHITE" Welcome back "COL_GREEN""SERVER_NAME""COL_WHITE". This account is registered, please input your password below.\n\n");
             
format(dialogsizeof(dialog), ""COL_WHITE"Account Name: "COL_GREEN"%s (ID:%i)\n ",ReturnPlayerName(playerid),playerid);
            
strcat(string,dialog);
             
format(dialogsizeof(dialog),""COL_WHITE"IP Address: "COL_GREEN"%s\n\n ",RPIP(playerid));
            
strcat(string,dialog);
            
strcat(string""COL_WHITE" **Remember to read "COL_RED"/rules "COL_WHITE".\n");
            
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,""COL_WHITE""SERVER_NAME" - Login",string,"Login","X");
           }
    }
    else
    {
        
InterpolateCameraPos(playerid1177.1447751243.40600549.8457832170.2109371284.39721644.55846745000);
        
InterpolateCameraLookAt(playerid1182.1140131243.84277350.1861452175.1882321284.80187944.30857445000);
        new 
dialog[180];
        new 
string[400];
        
strcat(string""COL_WHITE" Welcome to "COL_GREEN""SERVER_NAME""COL_WHITE". This account is not registered, please input your desired password below\n");
        
strcat(string""COL_WHITE" to register this account.\n\n");
         
format(dialogsizeof(dialog), ""COL_WHITE"Account Name: "COL_GREEN"%s (ID:%i)\n ",ReturnPlayerName(playerid),playerid);
        
strcat(string,dialog);
        
format(dialogsizeof(dialog),""COL_WHITE"IP Address:"COL_GREEN" %s\n\n ",RPIP(playerid));
        
strcat(string,dialog);
        
strcat(string""COL_WHITE" **Do "COL_RED"NOT "COL_WHITE"share your password with anyone. Not even administrators.\n");
         
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT,""COL_WHITE""SERVER_NAME" - Registration",string,"Register","X");
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)