-
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]
-
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.
-
Hol keressem akkor??
-
Hol keressem akkor??
keress ilyet:
SetPlayerTime(playerid, ......
[mod]Javítottam pawn code tagre![/mod]
-
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]
-
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]
-
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.
-
Hol keressem akkor??
-
Hol keressem akkor??
keress ilyet:
SetPlayerTime(playerid, ......
[mod]Javítottam pawn code tagre![/mod]
-
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]