Szerző Téma: Szolgálatba és Szolgálatbólki parancstól leáll a szerver...  (Megtekintve 414 alkalommal)

Szolgálatba és Szolgálatbólki parancstól leáll a szerver...
« Dátum: 2012. Április 20. - 17:09:47 »
0 Show voters
Hali all.
Csináltam egy szolgálatba és szolgálatbolki parancsot ami így néz ki:
 
      CMD:szolgalatba(playerid, params[])
{
if(IsPlayerLAdmin(playerid))
{
rendortimer = SetTimer(\"rtimer\",3000,false, \"i\", playerid);
new string[255];
new rendor[MAX_PLAYER_NAME];
GetPlayerName(playerid, rendor, sizeof(rendor));
SendClientMessage(playerid, -1, \"{ffa500}[RENDÕR,{00ff00}%s{ffa500}] {ff0000}Szolgálatba lépett!\", rendor);
SendClientMessageToAll(0x00ff1eAA,string);
}
else
{
SendClientMessage(playerid, PIROS, \"Csak rendõr tud szolgálatba állni!\");
}
return 1;
}
CMD:szolgalatbolki(playerid, params[])
{
if(IsPlayerLAdmin(playerid))
{
KillTimer(rendortimer);
new string[255];
new rendor2[MAX_PLAYER_NAME];
GetPlayerName(playerid, rendor2, sizeof(rendor2));
SendClientMessage(playerid, -1, \"{ffa500}[RENDÕR,{00ff00}%s{ffa500}] {ff0000}Kilépett a szolgálatból!\", rendor2);
SendClientMessageToAll(0x00ff1eAA,string);
}
else
{
SendClientMessage(playerid, PIROS, \"Csak rendõr tud kilépni a szolgálatból!\");
}
return 1;
}

 
Nem tudom mi lehet a baja mert mikor beirom valamelyik parancsot vagy a /szolgalatba vagy a /szolgalatbolki akkor leáll a szerver..
Néztem a server-log.txt de nem ír semmit..

Nem elérhető Benceee

  • 4785
    • Profil megtekintése
Szolgálatba és Szolgálatbólki parancstól leáll a szerver...
« Válasz #1 Dátum: 2012. Április 20. - 18:21:39 »
0 Show voters
crashdetect plugin?

Nem elérhető Gabor..

  • 1883
  • Gabor..
    • Profil megtekintése
Szolgálatba és Szolgálatbólki parancstól leáll a szerver...
« Válasz #2 Dátum: 2012. Április 20. - 18:23:51 »
+1 Show voters
CMD:szolgalatba(playerid, params[])
{
       if(IsPlayerLAdmin(playerid))
 {
  rendortimer = SetTimerEx(\"rtimer\",3000,false, \"i\", playerid);
  new string[255];
  new rendor[MAX_PLAYER_NAME];
  GetPlayerName(playerid, rendor, sizeof(rendor));
  format(string, sizeof(string), \"{ffa500}[RENDÕR,{00ff00}%s{ffa500}] {ff0000}Szolgálatba lépett!\", rendor);
  SendClientMessageToAll(0x00ff1eAA,string);
 }
 else
 {
  SendClientMessage(playerid, PIROS, \"Csak rendõr tud szolgálatba állni!\");
 }
 return 1;
}
CMD:szolgalatbolki(playerid, params[])
{
if(IsPlayerLAdmin(playerid))
{
KillTimer(rendortimer);
new string[255];
new rendor2[MAX_PLAYER_NAME];
GetPlayerName(playerid, rendor2, sizeof(rendor2));
format(string, sizeof(string), \"{ffa500}[RENDÕR,{00ff00}%s{ffa500}] {ff0000}Kilépett a szolgálatból!\", rendor2);
SendClientMessageToAll(0x00ff1eAA,string);
       }
       else
       {
SendClientMessage(playerid, PIROS, \"Csak rendõr tud kilépni a szolgálatból!\");
       }
       return 1;
}
« Utoljára szerkesztve: 2012. Április 20. - 18:29:08 írta Gabor.. »

Szolgálatba és Szolgálatbólki parancstól leáll a szerver...
« Válasz #3 Dátum: 2012. Április 21. - 10:12:39 »
0 Show voters
new rendortimer[MAX_PLAYERS];
CMD:szolgalatba(playerid, params[])
{
if(!IsPlayerLAdmin(playerid)) return SendClientMessage(playerid, PIROS, \"Csak rendõr tud szolgálatba állni!\");
rendortimer[playerid] = SetTimerEx(\"rtimer\",3000,false, \"i\", playerid);
new string[255], rendor[MAX_PLAYER_NAME];
GetPlayerName(playerid, rendor, sizeof(rendor));
format(string, sizeof(string), \"{ffa500}[RENDÕR, {00ff00}%s{ffa500}] {ff0000}Szolgálatba lépett!\", rendor);
SendClientMessageToAll(0x00ff1eAA,string);
return 1;
}
CMD:szolgalatbolki(playerid, params[])
{
if(!IsPlayerLAdmin(playerid)) return SendClientMessage(playerid, PIROS, \"Csak rendõr tud kilépni a szolgálatból!\");
KillTimer(rendortimer[playerid]);
new string[255], rendor[MAX_PLAYER_NAME];
GetPlayerName(playerid, rendor, sizeof(rendor));
format(string, sizeof(string), \"{ffa500}[RENDÕR, {00ff00}%s{ffa500}] {ff0000}Kilépett a szolgálatból!\", rendor);
SendClientMessageToAll(0x00ff1eAA,string);
return 1;
}

 
Pár hibát javítottam, mint például hogy 1 változóra akarsz több idõzítõt, ami azt jelenti hogy mindig újraindul, és csak az utolsót tudod leállítani.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal