Szerző Téma: óra rendszer bug  (Megtekintve 754 alkalommal)

óra rendszer bug
« Dátum: 2014. Április 30. - 19:49:21 »
0 Show voters
Sziasztok.
Ez az óra rendszer van a szerrverbe, és beírom , hogy /óra 0, sötét lesz, majd 10-15 mp múlva újra világos..
Miért vált mindig vissza??
 

if(strcmp(cmd, \"/óra\", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
   tmp = strtok(cmdtext, idx);
   if(!strlen(tmp))
   {
      Msg(playerid,\"/óra [timeofday] (0-23)\");
      return 1;
   }
   SetWorldTime(hour);
   hour = strval(tmp);
   if (PlayerInfo[playerid][pAdmin] >= 1337)
   {
            SetWorldTime(hour);
      format(string, sizeof(string), \"   Az idõ átírva. Az új idõ:%d óra.\", hour);
      BroadCast(COLOR_GRAD1, string);
   }
   else
   {
      SendClientMessage(playerid, COLOR_GRAD1, \"   Ezt a parancsot nem használhatod !\");
   }
}
return 1;
}

 
[mod]Javítottam pawn code tagre![/mod]
« Utoljára szerkesztve: 2014. Április 30. - 22:57:20 írta Dfoglalo »

Nem elérhető huhboy

  • 894
  • huhboy
    • Profil megtekintése
óra rendszer bug
« Válasz #1 Dátum: 2014. Április 30. - 19:51:01 »
0 Show voters
valószínûleg van a módban egy automatikus óraátállító, ami az aktuális óra szerint állítja a szerver idejét.

óra rendszer bug
« Válasz #2 Dátum: 2014. Április 30. - 20:30:59 »
0 Show voters
Hol keressem akkor??

Nem elérhető huhboy

  • 894
  • huhboy
    • Profil megtekintése
óra rendszer bug
« Válasz #3 Dátum: 2014. Április 30. - 20:34:51 »
0 Show voters
Idézetet írta: Devil112 date=1398882659\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"47985\" data-ipsquote-contentclass=\"forums_Topic
Hol keressem akkor??
 
keress ilyet:
 
 SetPlayerTime(playerid, ......

 
[mod]Javítottam pawn code tagre![/mod]
« Utoljára szerkesztve: 2014. Április 30. - 22:57:38 írta Dfoglalo »

óra rendszer bug
« Válasz #4 Dátum: 2014. Április 30. - 20:45:23 »
0 Show voters

public UpdateTime()
{
    gettime(hour, minute);
      format(timestr,32,\"%02d:%02d\",hour,minute);
      TextDrawSetString(txtTimeDisp,timestr);
      SetWorldTime(hour);
new x=0;
while(x!=MAX_PLAYERS)
{
    if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE)
{
   SetPlayerTime(x,hour,minute);
   }
   x++;
}
if(hour == 33 && minute == 00)
{
GameTextForAll(\"~w~szerver restart\",2000,1);
SetTimer(\"Gor10\", 1000, 0);
SetTimer(\"Gor9\", 2000, 0);
SetTimer(\"Gor8\", 3000, 0);
SetTimer(\"Gor7\", 4000, 0);
SetTimer(\"Gor6\", 5000, 0);
SetTimer(\"Gor5\", 6000, 0);
SetTimer(\"Gor4\", 7000, 0);
SetTimer(\"Gor3\", 8000, 0);
SetTimer(\"Gor2\", 9000, 0);
SetTimer(\"Gor1\", 10000, 0);
SetTimer(\"ServerReset\", 11000,0);
new h,mi,s,y,m,d;
getdate(y,m,d);
gettime(h,mi,s);
format(stringx,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] Hajnali 3-as frissítés.\",y,m,d,h,mi,s);
LoOoG(stringx);
}
}

 
[mod]Javítottam pawn code tagre![/mod]
« Utoljára szerkesztve: 2014. Április 30. - 22:59:55 írta Dfoglalo »

óra rendszer bug
« Válasz #5 Dátum: 2014. Április 30. - 19:49:21 »
0 Show voters
Sziasztok.
Ez az óra rendszer van a szerrverbe, és beírom , hogy /óra 0, sötét lesz, majd 10-15 mp múlva újra világos..
Miért vált mindig vissza??
 

if(strcmp(cmd, \"/óra\", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
   tmp = strtok(cmdtext, idx);
   if(!strlen(tmp))
   {
      Msg(playerid,\"/óra [timeofday] (0-23)\");
      return 1;
   }
   SetWorldTime(hour);
   hour = strval(tmp);
   if (PlayerInfo[playerid][pAdmin] >= 1337)
   {
            SetWorldTime(hour);
      format(string, sizeof(string), \"   Az idõ átírva. Az új idõ:%d óra.\", hour);
      BroadCast(COLOR_GRAD1, string);
   }
   else
   {
      SendClientMessage(playerid, COLOR_GRAD1, \"   Ezt a parancsot nem használhatod !\");
   }
}
return 1;
}

 
[mod]Javítottam pawn code tagre![/mod]
« Utoljára szerkesztve: 2014. Április 30. - 22:57:20 írta Dfoglalo »

Nem elérhető huhboy

  • 894
  • huhboy
    • Profil megtekintése
óra rendszer bug
« Válasz #6 Dátum: 2014. Április 30. - 19:51:01 »
0 Show voters
valószínûleg van a módban egy automatikus óraátállító, ami az aktuális óra szerint állítja a szerver idejét.

óra rendszer bug
« Válasz #7 Dátum: 2014. Április 30. - 20:30:59 »
0 Show voters
Hol keressem akkor??

Nem elérhető huhboy

  • 894
  • huhboy
    • Profil megtekintése
óra rendszer bug
« Válasz #8 Dátum: 2014. Április 30. - 20:34:51 »
0 Show voters
Idézetet írta: Devil112 date=1398882659\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"47985\" data-ipsquote-contentclass=\"forums_Topic
Hol keressem akkor??
 
keress ilyet:
 
 SetPlayerTime(playerid, ......

 
[mod]Javítottam pawn code tagre![/mod]
« Utoljára szerkesztve: 2014. Április 30. - 22:57:38 írta Dfoglalo »

óra rendszer bug
« Válasz #9 Dátum: 2014. Április 30. - 20:45:23 »
0 Show voters

public UpdateTime()
{
    gettime(hour, minute);
      format(timestr,32,\"%02d:%02d\",hour,minute);
      TextDrawSetString(txtTimeDisp,timestr);
      SetWorldTime(hour);
new x=0;
while(x!=MAX_PLAYERS)
{
    if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE)
{
   SetPlayerTime(x,hour,minute);
   }
   x++;
}
if(hour == 33 && minute == 00)
{
GameTextForAll(\"~w~szerver restart\",2000,1);
SetTimer(\"Gor10\", 1000, 0);
SetTimer(\"Gor9\", 2000, 0);
SetTimer(\"Gor8\", 3000, 0);
SetTimer(\"Gor7\", 4000, 0);
SetTimer(\"Gor6\", 5000, 0);
SetTimer(\"Gor5\", 6000, 0);
SetTimer(\"Gor4\", 7000, 0);
SetTimer(\"Gor3\", 8000, 0);
SetTimer(\"Gor2\", 9000, 0);
SetTimer(\"Gor1\", 10000, 0);
SetTimer(\"ServerReset\", 11000,0);
new h,mi,s,y,m,d;
getdate(y,m,d);
gettime(h,mi,s);
format(stringx,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] Hajnali 3-as frissítés.\",y,m,d,h,mi,s);
LoOoG(stringx);
}
}

 
[mod]Javítottam pawn code tagre![/mod]
« Utoljára szerkesztve: 2014. Április 30. - 22:59:55 írta Dfoglalo »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal