Jump to content

Question

Posted

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]

4 answers to this question

Recommended Posts

Posted

Ai cumva Weather System?

Nu

Uite

[pawn] if(strcmp(cmd, "/weather", 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} /weather [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; }

SetPlayerWeather(playerid, weather);

SendClientMessage(playerid, COLOR_GREY, "  Weather Set !");

}

return 1;

}[/pawn]

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.