About tod
#1

Hi im experiencing a Problem About my tod if i change the time to /tod 1 The time Still got no effect IG It just like When i use /tod 1 the Time gone Fast and Back it to normal

here is my Code

CMD:tod(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
new string[128], time;
if(sscanf(params, "d", time)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /tod [time] (0-23)");

SetWorldTime(time);
gTime = time;
format(string, sizeof(string), "Time set to %d:00.", time);
BroadCast(COLOR_GRAD1, string);
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
}
return 1;
}
Reply
#2

Are you syncing time with SetPlayerTime anywhere?
Reply
#3

Try with this

//----------------------------------[TOD]-----------------------------------------------

if(strcmp(cmd, "/tod", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /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:00.", hour);
BroadCast(COLOR_GRAD1, string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command!");
}
}
return 1;
}
Reply
#4

Are you syncing time with SetPlayerTime anywhere?


What is syncing time with Setplayertime

this is the problem if i set the time its not stable its just back with the same time >.<
Reply
#5

Quote:
Originally Posted by MP2
Посмотреть сообщение
Are you syncing time with SetPlayerTime anywhere?
What you mean Syncing
Reply
#6

Quote:
Originally Posted by Emil123
Посмотреть сообщение
Try with this

//----------------------------------[TOD]-----------------------------------------------

if(strcmp(cmd, "/tod", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /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:00.", hour);
BroadCast(COLOR_GRAD1, string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command!");
}
}
return 1;
}
i get alot of errors if i use that
Reply
#7

Quote:
Originally Posted by MP2
Посмотреть сообщение
Are you syncing time with SetPlayerTime anywhere?

chu mean syncing?
Reply
#8

Do you use SetPlayerTime or TogglePlayerClock in your script?
Reply
#9

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
Do you use SetPlayerTime or TogglePlayerClock in your script?
I Forgot how can i check it lol Btw my script is so old that why i forgot it >.< Can you help me i think its setplayertime
Reply
#10

Press Ctrl+F to search.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)