SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 11/11/2018, 01:50 AM   #1
Leaky
Big Clucker
 
Join Date: Jul 2018
Posts: 55
Reputation: 12
Default Script not responding

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
__________________
Leaky is offline   Reply With Quote
Old 11/11/2018, 09:23 PM   #2
Leaky
Big Clucker
 
Join Date: Jul 2018
Posts: 55
Reputation: 12
Default Re: Script not responding

bump
__________________
Leaky is offline   Reply With Quote
Old 11/11/2018, 09:29 PM   #3
CJ101
High-roller
 
CJ101's Avatar
 
Join Date: Jan 2008
Location: RevolutionX
Posts: 1,902
Reputation: 162
Default Re: Script not responding

That plugin isn't always stable.

Did you add discord_bot_token into server.cfg?
__________________
Code:
I'm working on a project. CLICK HERE to join my discord. In short: It's a roleplaying server like no other. warning: in BETA
CJ101 is offline   Reply With Quote
Old 11/11/2018, 11:03 PM   #4
Leaky
Big Clucker
 
Join Date: Jul 2018
Posts: 55
Reputation: 12
Default Re: Script not responding

Quote:
Originally Posted by CJ101 View Post
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.
__________________
Leaky is offline   Reply With Quote
Old 20/11/2018, 05:49 AM   #5
Leaky
Big Clucker
 
Join Date: Jul 2018
Posts: 55
Reputation: 12
Default Re: Script not responding

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?
__________________
Leaky is offline   Reply With Quote
Old 20/11/2018, 09:15 AM   #6
CantBeJohn
Big Clucker
 
CantBeJohn's Avatar
 
Join Date: Oct 2016
Posts: 113
Reputation: 15
Default Re: Script not responding

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)?
__________________
Server IP: play.adh-rp.com
Alternate IP: 54.37.129.82:7777

CantBeJohn is offline   Reply With Quote
Old 24/11/2018, 04:50 AM   #7
Leaky
Big Clucker
 
Join Date: Jul 2018
Posts: 55
Reputation: 12
Default Re: Script not responding

Quote:
Originally Posted by CantBeJohn View Post
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 Code:
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 Code:
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 Code:

//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;

__________________
Leaky is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SA:MP isn't Responding? SpikY_ Client Support 16 31/05/2015 01:38 PM
GTA not responding.. Paul55 Client Support 5 18/01/2014 12:48 PM
[HELP] Server Not Responding: LSLRP Script, Linux. Dokins Help Archive 5 09/01/2011 07:14 PM
Not Responding But It Is? aceisnice Client Support 8 07/01/2011 06:22 PM
Not Responding... Help Please.. Figglewatts Client Support 0 18/03/2010 06:40 AM


All times are GMT. The time now is 12:58 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.