Guel
Member
Hello, I got a problem on my server which the time in game doesn't sync in our region. How can I fix it?
I'm from Philippines btw.
I'm from Philippines btw.
C-like:
GetDate()
{
new date[5], string[24];
getdate(date[0], date[1], date[2]);
gettime(date[3], date[4]);
format(string, sizeof(string), "%i-%02d-%02d %02d:%02d", date[0], date[1], date[2], date[3], date[4]);
return string;
}
RefreshTime()
{
new hour, minute, string[12];
gettime(hour, minute);
format(string, sizeof(string), "%02d:%02d", hour, minute);
TextDrawSetString(TimeTD, string);
format(string, sizeof(string), "%02d:%02d", hour, minute);
TextDrawSetString(PhoneTD[11], string);
format(string, sizeof(string), "%02d:%02d", hour, minute);
TextDrawSetString(CallingTD[11], string);
}
CMD:pw(playerid, params[])
{
if(!pData[playerid][pWatch])
{
return SCM(playerid, COLOR_SYNTAX, "You don't have a pocket watch. You can buy one at 24/7.");
}
if(!pData[playerid][pWatchOn])
{
if(pData[playerid][pToggleTextdraws])
{
return SCM(playerid, COLOR_SYNTAX, "You can't turn on your watch as you have textdraws toggled! (/toggle textdraws)");
}
pData[playerid][pWatchOn] = 1;
ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_watch", 4.1, 0, 0, 0, 0, 0);
TextDrawShowForPlayer(playerid, TimeTD);
SendProximityMessage(playerid, 20.0, SERVER_COLOR, "**{C2A2DA} %s turns on their watch.", GetRPName(playerid));
}
else
{
pData[playerid][pWatchOn] = 0;
ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_watch", 4.1, 0, 0, 0, 0, 0);
TextDrawHideForPlayer(playerid, TimeTD);
SendProximityMessage(playerid, 20.0, SERVER_COLOR, "**{C2A2DA} %s turns off their watch.", GetRPName(playerid));
}
return 1;
}
Last edited: