gettime() help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: gettime() help (
/showthread.php?tid=595402)
gettime() help -
Lenon - 02.12.2015
Why I can't store gettime? I make it like this:
Code:
PlayerInfo[id][pTime] = gettime();
Re: gettime() help -
AbyssMorgan - 02.12.2015
Wtf
PHP Code:
native gettime(&hour,&minute,&second);
Re: gettime() help -
Vince - 02.12.2015
Quote:
Originally Posted by AbyssMorgan
Wtf
PHP Code:
native gettime(&hour,&minute,&second);
|
If you took the time to look up the wiki page, you should've also noted that:
Quote:
Return Values:
The function itself returns a Unix Timestamp, however if arguments are specified then the hours, minutes and seconds for the current time are returned.
|
OP's code is perfectly valid syntax, assuming that pTime is an integer.
Re: gettime() help -
Lenon - 03.12.2015
Here is saving and loading using YINI
enum pTime
load
Code:
INI_Int("Time",PlayerInfo[playerid][pTime]);
save
Code:
INI_WriteInt(File,"Time",PlayerInfo[playerid][pTime]);
and still can't save it, value in .ini file is 0
Re: gettime() help -
Lenon - 03.12.2015
bump
Re: gettime() help -
TwinkiDaBoss - 03.12.2015
Whats ID supposted to represent?
pawn Code:
PlayerInfo[id][pTime] = gettime(); //ID? other player? inside a command?
Re: gettime() help -
Lenon - 03.12.2015
Yes. Solved, was an issue with y_ini.inc