GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: Yakuza™ - 2012. április 20. - 17:09:47

Cím: Szolgálatba és Szolgálatbólki parancstól leáll a szerver...
Írta: Yakuza™ - 2012. április 20. - 17:09:47
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..
Cím: Szolgálatba és Szolgálatbólki parancstól leáll a szerver...
Írta: Benceee - 2012. április 20. - 18:21:39
crashdetect plugin?
Cím: Szolgálatba és Szolgálatbólki parancstól leáll a szerver...
Írta: Gabor.. - 2012. április 20. - 18:23:51
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;
}
Cím: Szolgálatba és Szolgálatbólki parancstól leáll a szerver...
Írta: TengeriMalac - 2012. április 21. - 10:12:39
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.