Get Time
#7

Quote:
Originally Posted by ******
Посмотреть сообщение
You need to enter your timezone somewhere, say in a command, then add that offset to the hour returned by gettime.
CMD:time(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi inainte de a face asta.");
if(PlayerInfo[playerid][pSleeping] == 1) return 1;
new sendername[25],string[256];
new hour,minute,second;
gettime(hour,minute,second);
format(string, sizeof(string), "Acum e ora %d:%s%d si %d secunde.", hour, (minute < 10) ? ("0") : (""), minute, second);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Ai jucat %d secunde din aceasta ora.", PlayerInfo[playerid][pPayDay]);
SendClientMessage(playerid, COLOR_WHITE, string);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s isi da maneca la o parte si se uita la ceas.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
if(!IsPlayerInAnyVehicle(playerid)) ApplyAnimation(playerid,"COP_AMBIENT","Coplook_wat ch",4.1,0,0,0,0,0);
return 1;
}
Reply


Messages In This Thread
Get Time - by Longover - 02.03.2019, 08:03
Re: Get Time - by Longover - 02.03.2019, 08:14
Re: Get Time - by Longover - 02.03.2019, 08:43
Re: Get Time - by Jeffry - 02.03.2019, 09:02
Re: Get Time - by Longover - 02.03.2019, 09:38
Re: Get Time - by Jeffry - 02.03.2019, 10:14
Re: Get Time - by Longover - 02.03.2019, 10:26
Re: Get Time - by Jeffry - 02.03.2019, 10:38
Re: Get Time - by Longover - 02.03.2019, 10:47
Re: Get Time - by Jeffry - 02.03.2019, 14:29
Re: Get Time - by Jeffry - 02.03.2019, 19:57
Re: Get Time - by Jeffry - 03.03.2019, 11:50
Re: Get Time - by Jeffry - 03.03.2019, 18:15
Re: Get Time - by masuzaron - 03.03.2019, 19:11

Forum Jump:


Users browsing this thread: 2 Guest(s)