- 0
Bug /tod
-
Similar Content
-
- 4 replies
- 340 views
-
- 9 replies
- 379 views
-
- 1 reply
- 310 views
-
- 2 answers
- 488 views
-
- 3 replies
- 419 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
Madu99
Nu stiu cum pot rezolva aceasta problema...
Deci cand dau /tod nu se modifica timpul iar seara pe la ora 22:00 cam asa mereu se schimba timpul si apare la tot sv mov ca si cum cineva ar da /weatherall 99.Dupa payday isi revine.
De fiecare data trebuie sa dau /weatherall 0 ....
/tod
[pawn] if(strcmp(cmd, "/tod", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{D580FE}Foloseste:{FFFFFF} /tod [timeofday] (0-23)");
return 1;
}
new hour;
hour = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
SetWorldTime(hour);
format(string, sizeof(string), " Time set to %d Hours.", hour);
BroadCast(COLOR_GRAD1, string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command !");
}
}
return 1;
}[/pawn]
/weatherall
[pawn] if(strcmp(cmd, "/weatherall", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 4)
{
SendClientMessage(playerid, COLOR_GRAD1, " Nu ai dreptul de a utiliza aceasta comanda!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "{D580FE}Foloseste:{FFFFFF} /weatherall [weatherid]");
return 1;
}
new weather;
weather = strval(tmp);
if(weather < 0||weather > 45) { SendClientMessage(playerid, COLOR_GREY, " Weather ID can't be below 0 or above 45 !"); return 1; }
SetWeather(10);
SendClientMessage(playerid, COLOR_GREY, " Weather Set to everyone !");
}
return 1;
}[/pawn]
Link to comment
Share on other sites
4 answers to this question
Recommended Posts