SA-MP Forums Archive
Command Crashed my server then internet - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Command Crashed my server then internet (/showthread.php?tid=136877)



Command Crashed my server then internet - PoliceRock101 - 26.03.2010

Hello everyone. I have this little problem. I was playing on my server with a few other people and all the sudden i typed the admin commands /fuelcar(s) For a few seconds it froze then the server turned up to end up restarting and keep trying to connect. I tried it on my own connection to see if it was a problem with the server but the same thing happen. Here is the code below. Any help would be appreciated. Thanks for reading and helping.

Код:
}
	if(strcmp(cmd, "/fuelcars", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(PlayerInfo[playerid][pAdmin] >= 10)
	    {
	      for(new c=0;c<MAX_VEHICLES;c++)
				{
					Fuel[c] = GasMax;
				}
				SendClientMessageToAll(COLOR_ADMINCMD, "(INFO) All cars refueled by administrator %s");
	    }
	    else
	    {
	      SendClientMessage(playerid, COLOR_GREY, "(ERROR) You are not authorized to use that command");
	      return 1;
	    }
	  }
	  return 1;
	}



Re: Command Crashed my server then internet - Flake. - 26.03.2010

Well Try this

pawn Код:
if(strcmp(cmd, "/fuelcars", true) == 0)
    {
      if(IsPlayerConnected(playerid))
      {
        if(PlayerInfo[playerid][pAdmin] >= 10)
        {
          for(new c=0;c<MAX_VEHICLES;c++)
                {
                    Fuel[c] = GasMax;
                }
                SendClientMessageToAll(COLOR_ADMINCMD, "(INFO) All cars refueled by administrator %s");
        }
        else
        {
          SendClientMessage(playerid, COLOR_GREY, "(ERROR) You are not authorized to use that command");
          return 1;
        }



Re: Command Crashed my server then internet - PoliceRock101 - 27.03.2010

That didn`t seem to work and i can`t figure this out at all. It makes no sense. Here a picture to show what happens.




What happens is i connect i`m a 1338 Admin. I type the following command: /fuelcars then no message appears at all saying they were fueled. Then about 10 seconds later the whole server goes down and attempts to reconnect.


Re: Command Crashed my server then internet - Tenshi - 27.03.2010

something in " Fuel[c] = GasMax; " must be causing it, post that part too