Szerző Téma: /szerver gmx hiba  (Megtekintve 648 alkalommal)

Nem elérhető Sweep

  • 271
    • Profil megtekintése
/szerver gmx hiba
« Dátum: 2012. Május 05. - 17:01:38 »
0 Show voters
if(strcmp(cmd, \"/szerver\", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
   if(Admin(playerid, 1338))
   {
      if(params != 2)
      {
         SendClientMessage(playerid, COLOR_GREY, \"Használata: /szerver [funkció] [idõ]\");
         SendClientMessage(playerid, COLOR_GREY, \"Funkciók: gmx, stop\");
         return 1;
      }
      tmp = GetParam(cmdtext, 1);
      new ido = strval(param[2]);
      if(ido < 5 || ido > 10)
         return Msg(playerid, \"Minimum 5mp, max 10másodperc!\");
      if(strcmp(tmp, \"resi\", true) == 0)
      {
         SendClientMessageToAll(COLOR_LIGHTRED, \"<<< ======================================== >>>\");
         SendFormatMessageToAll(COLOR_LIGHTBLUE, \"<<< A szerver újraindul kb. %d másodperc mulva >>>\", ido);
         SendClientMessageToAll(COLOR_LIGHTRED, \"<<< ======================================== >>>\");
         for(new i = 0; i < MAX_PLAYERS; i++)
         {
            GameTextForPlayer(i, \"~r~~h~================~n~Restart!~n~~r~~h~================\", 5, 10);
         }
         //SetTimer(\"Restart\", ((ido*5)+10), false);
         SaveAccounts();
         UpdatePerSec[uHaz] = 20;
         UpdatePerSec[uKocsi] = 20;
         UpdatePerSec[uBiz] = 20;
         MySQLUpdater();
         resivan = 1;
      }
      else if(strcmp(tmp, \"resi-clint\", true) == 0)
      {
         SendClientMessageToAll(COLOR_LIGHTRED, \"<<< ======================================== >>>\");
         SendFormatMessageToAll(COLOR_LIGHTBLUE, \"<<< A szerver újraindul kb. %d másodperc mulva >>>\", ido);
         SendClientMessageToAll(COLOR_LIGHTRED, \"<<< ======================================== >>>\");
         for(new i = 0; i < MAX_PLAYERS; i++)
         {
            GameTextForPlayer(i, \"~r~~h~================~n~Restart!~n~~r~~h~================\", 3000, 5);
         }
         SetTimer(\"Restart\", ((ido*5)+10), false);
         SaveAccounts();
         UpdatePerSec[uHaz] = 20;
         UpdatePerSec[uKocsi] = 20;
         UpdatePerSec[uBiz] = 20;
         MySQLUpdater();
         resivan = 1;
      }
      else if(strcmp(tmp, \"stop\", true) == 0)
      {
         if(!IsFoAdmin(playerid)) return SendClientMessage(playerid, COLOR_GREY, \"Ezt csak a szerver legfõbb adminjai használhatják.\");
         SendClientMessageToAll(COLOR_LIGHTRED, \"<<< ================================= >>>\");
         SendFormatMessageToAll(COLOR_LIGHTBLUE, \"<<< A szerver leáll %d másodperc mulva >>>\", ido);
         SendClientMessageToAll(COLOR_LIGHTRED, \"<<< ================================= >>>\");
         for(new i = 0; i < MAX_PLAYERS; i++)
         {
            GameTextForPlayer(i, \"~r~~h~==============~n~Szerver leallas!~n~~r~~h~==============\", 50, 5);
         }
         SetTimer(\"Stop\", ((ido*5)+10), false);
         SaveAccounts();
         UpdatePerSec[uHaz] = 20;
         UpdatePerSec[uKocsi] = 20;
         UpdatePerSec[uBiz] = 20;
         MySQLUpdater();
         resivan = 1;
      }
      else
      {
         SendClientMessage(playerid, COLOR_GREY, \"Használata: /szerver [funkció] [idõ]\");
         SendClientMessage(playerid, COLOR_GREY, \"Funkciók: gmx, stop\");
      }
   }
}
return 1;
}
/*if(strcmp(cmd, \"/gmx\", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
   if (PlayerInfo[playerid][pAdmin] >= 1337)
   {
      SendClientMessageToAll(COLOR_LIGHTRED, \"<<< ====================================================================================== >>>\");
      SendClientMessageToAll(COLOR_LIGHTBLUE, \"<<< A szerver újraindul 5 másodperc mulva! Nem kell kilépned! Az ujrainditási idõ 5-10sec között lesz >>>\");
      SendClientMessageToAll(COLOR_LIGHTRED, \"<<< ====================================================================================== >>>\");
      for(new i = 0; i < MAX_PLAYERS; i++)
      {
         GameTextForPlayer(i, \"~r~~h~===================~n~Restart!~n~~r~~h~===================\", 5, 10);
      }
      SetTimer(\"Restart\", 5, false);
      SaveAccounts();
      //GameModeExit();
   }
   else
   {
      SendClientMessage(playerid, COLOR_GRAD1, \"   Ezt a parancsot nem használhatod !\");
   }
}
return 1;
}*/

 
Ezt kellene nekem meg csinálni úgy hogy müködjön is és a mysql el is mentse az adatokat!!!!
mert most valamiért nem indul újra a szerver... :S

Nem elérhető Erik3333

  • 945
  • SMF | phpBB | TS3 | PHP | HTML | CSS | JS | PAWN | JAVA
    • Profil megtekintése
/szerver gmx hiba
« Válasz #1 Dátum: 2012. Május 05. - 17:10:30 »
0 Show voters
Talán így?
 
            if(strcmp(tmp, \"resi\", true) == 0)
      {
         SendClientMessageToAll(COLOR_LIGHTRED, \"<<< ======================================== >>>\");
         SendFormatMessageToAll(COLOR_LIGHTBLUE, \"<<< A szerver újraindul kb. %d másodperc mulva >>>\", ido);
         SendClientMessageToAll(COLOR_LIGHTRED, \"<<< ======================================== >>>\");
         for(new i = 0; i < MAX_PLAYERS; i++)
         {
            GameTextForPlayer(i, \"~r~~h~================~n~Restart!~n~~r~~h~================\", 5, 10);
         }
         SetTimer(\"Restart\", ((ido*5)+10), false);
         SaveAccounts();
         UpdatePerSec[uHaz] = 20;
         UpdatePerSec[uKocsi] = 20;
         UpdatePerSec[uBiz] = 20;
         MySQLUpdater();
         resivan = 1;
      }

Nem elérhető Sweep

  • 271
    • Profil megtekintése
/szerver gmx hiba
« Válasz #2 Dátum: 2012. Május 05. - 17:12:42 »
0 Show voters
Ezt kellene bele írni, vagy ezt javítsam? :D

Nem elérhető Erik3333

  • 945
  • SMF | phpBB | TS3 | PHP | HTML | CSS | JS | PAWN | JAVA
    • Profil megtekintése
/szerver gmx hiba
« Válasz #3 Dátum: 2012. Május 05. - 17:23:06 »
0 Show voters
Idézetet írta: Sweep date=1336230762\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21068\" data-ipsquote-contentclass=\"forums_Topic
Ezt kellene bele írni, vagy ezt javítsam? :D
 
Itt az egész parancs:
 
   if(strcmp(cmd, \"/szerver\", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
   if(Admin(playerid, 1337))
   {
      if(params != 2)
      {
         SendClientMessage(playerid, COLOR_GREY, \"Használata: /szerver [funkció] [idõ]\");
         SendClientMessage(playerid, COLOR_GREY, \"Funkciók: gmx, stop\");
         return 1;
      }
      tmp = GetParam(cmdtext, 1);
      new ido = strval(param[2]);
      if(ido < 45 || ido > 300)
         return Msg(playerid, \"Minimum 45mp, max 5perc másodperc!\");
      if(strcmp(tmp, \"gmx\", true) == 0)
      {
         SendClientMessageToAll(COLOR_LIGHTRED, \"<<< ======================================== >>>\");
         SendFormatMessageToAll(COLOR_LIGHTBLUE, \"<<< A szerver újraindul kb. %d másodperc mulva >>>\", ido);
         SendClientMessageToAll(COLOR_LIGHTRED, \"<<< ======================================== >>>\");
         for(new i = 0; i < MAX_PLAYERS; i++)
         {
            GameTextForPlayer(i, \"~r~~h~================~n~Restart!~n~~r~~h~================\", 3000, 5);
         }
         SetTimer(\"Restart\", ((ido*1000)+1000), false);
         SaveAccounts();
         UpdatePerSec[uHaz] = 20;
         UpdatePerSec[uKocsi] = 20;
         UpdatePerSec[uBiz] = 20;
         MySQLUpdater();
         resivan = 1;
      }
      else if(strcmp(tmp, \"gmx-clint\", true) == 0)
      {
         SendClientMessageToAll(COLOR_LIGHTRED, \"<<< ======================================== >>>\");
         SendFormatMessageToAll(COLOR_LIGHTBLUE, \"<<< A szerver újraindul kb. %d másodperc mulva >>>\", ido);
         SendClientMessageToAll(COLOR_LIGHTRED, \"<<< ======================================== >>>\");
         for(new i = 0; i < MAX_PLAYERS; i++)
         {
            GameTextForPlayer(i, \"~r~~h~================~n~Restart!~n~~r~~h~================\", 3000, 5);
         }
         SetTimer(\"Restart\", ((ido*1000)+1000), false);
         SaveAccounts();
         UpdatePerSec[uHaz] = 20;
         UpdatePerSec[uKocsi] = 20;
         UpdatePerSec[uBiz] = 20;
         MySQLUpdater();
         resivan = 1;
      }
      else if(strcmp(tmp, \"stop\", true) == 0)
      {
         if(!IsFoAdmin(playerid)) return SendClientMessage(playerid, COLOR_GREY, \"Ezt csak a szerver legfõbb adminjai használhatják.\");
         SendClientMessageToAll(COLOR_LIGHTRED, \"<<< ================================= >>>\");
         SendFormatMessageToAll(COLOR_LIGHTBLUE, \"<<< A szerver leáll %d másodperc mulva >>>\", ido);
         SendClientMessageToAll(COLOR_LIGHTRED, \"<<< ================================= >>>\");
         for(new i = 0; i < MAX_PLAYERS; i++)
         {
            GameTextForPlayer(i, \"~r~~h~==============~n~Szerver leallas!~n~~r~~h~==============\", 3000, 5);
         }
         SetTimer(\"Stop\", ((ido*1000)+1000), false);
         SaveAccounts();
         UpdatePerSec[uHaz] = 20;
         UpdatePerSec[uKocsi] = 20;
         UpdatePerSec[uBiz] = 20;
         MySQLUpdater();
         resivan = 1;
      }
      else
      {
         SendClientMessage(playerid, COLOR_GREY, \"Használata: /szerver [funkció] [idõ]\");
         SendClientMessage(playerid, COLOR_GREY, \"Funkciók: gmx, stop\");
      }
   }
}
return 1;
}
« Utoljára szerkesztve: 2012. Május 05. - 17:23:20 írta Erik3333 »

Nem elérhető Sweep

  • 271
    • Profil megtekintése
/szerver gmx hiba
« Válasz #4 Dátum: 2012. Május 05. - 17:56:18 »
0 Show voters
Kösz a segítséget jó lett :)

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal