/tod Command
#1

The /tod command in my script works but is over thrown by something else. When I use the command it switches the weather for a second and switches it right back. Anyone know what can solve this issue? I want to change the server time and the players time. Simply trying to make it day time.
Reply
#2

Well, look up for your current /tod command and place this simple one:

pawn Код:
CMD:tod(playerid, params[])
{
    new string[128], time;
    if(!IsPlayerAdmin(playerid)) return 1;
    if(sscanf(params, "d", time)) return SyntaxMSG(playerid, "/tod [time] (0-23)");
    SetWorldTime(time);
    format(string, sizeof(string), "Time set to %d:00.", time);
    SendClientMessageToAll(-1, string);
    return 1;
}
Reply
#3

Quote:
Originally Posted by PaulDinam
Посмотреть сообщение
Well, look up for your current /tod command and place this simple one:

pawn Код:
CMD:tod(playerid, params[])
{
    new string[128], time;
    if(!IsPlayerAdmin(playerid)) return 1;
    if(sscanf(params, "d", time)) return SyntaxMSG(playerid, "/tod [time] (0-23)");
    SetWorldTime(time);
    format(string, sizeof(string), "Time set to %d:00.", time);
    SendClientMessageToAll(-1, string);
    return 1;
}
Looks similar to mine but ill try it.
Reply
#4

Quote:
Originally Posted by PaulDinam
Посмотреть сообщение
Well, look up for your current /tod command and place this simple one:

pawn Код:
CMD:tod(playerid, params[])
{
    new string[128], time;
    if(!IsPlayerAdmin(playerid)) return 1;
    if(sscanf(params, "d", time)) return SyntaxMSG(playerid, "/tod [time] (0-23)");
    SetWorldTime(time);
    format(string, sizeof(string), "Time set to %d:00.", time);
    SendClientMessageToAll(-1, string);
    return 1;
}
Did not work, it switches for a second and then goes back, what could be doing this?
Reply
#5

Yes im using setplayertime.
Reply
#6

Do you have timer somewhere changing the global time? Enlighten us with your code.
Reply
#7

Quote:
Originally Posted by Bakr
Посмотреть сообщение
Do you have timer somewhere changing the global time? Enlighten us with your code.
Could you add me on skype? tom.repalone
Reply
#8

I need a command that uses setplayertime I think.
Reply
#9

Search in your code for: SetPlayerTime
And tell me if you find it anywhere else in your script. It could be this causing it to change back to another time.

~Airplanesimen
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)