Timer save
#1

Hu guys, i wanna to make this, example: i type /sekou and that command to make treet at my pos and add on him 3d text label, and how can i save that objects afther server restart?

and it is possable when i type /sekou and i add timer to 13hour untill its done and when i restart server and begore restart its left 2 hours to save that and to i can add unlimited /sekou and to all time save..

example: on one 2 hours untill done and on another 9 hours and when i restart server to that save...
Reply
#2

Question 1: You can save it by making savable variables, most likely either in a .txt, .cfg or .ini file or make a new MySQL table if you're using MySQL. This will load it when the server starts, you can make a forward & public declaration for that. It's not gonna be too easy.

Question 2: Yes, that's possible, you'll need to make a document that saves the timers in a Unix Timestamp and then use if(gettime() >= X). That's not easy either.
Reply
#3

Quote:
Originally Posted by DanishHaq
Посмотреть сообщение
Question 1: You can save it by making savable variables, most likely either in a .txt, .cfg or .ini file or make a new MySQL table if you're using MySQL. This will load it when the server starts, you can make a forward & public declaration for that. It's not gonna be too easy.

Question 2: Yes, that's possible, you'll need to make a document that saves the timers in a Unix Timestamp and then use if(gettime() >= X). That's not easy either.
Ok, i created with savable variables and all is ok, but when i type command this object is not creating

Код:
new Float:pozx, Float:pozy, Float:pozz;
				GetPlayerPos(playerid, pozx, pozy, pozz);
				DI[drvoid][dDrvoX] = pozx;
				DI[drvoid][dDrvoY] = pozy;
				DI[drvoid][dDrvoZ] = pozz;
				CreateDynamicObject(591, DI[drvoid][dDrvoX],DI[drvoid][dDrvoY],DI[drvoid][dDrvoZ], 0.0000000, 0.0000000, 0.0000000);
and when that object need to create its just write me to chat Warning(opcode 0x107): Exception 0xC0000005 at 0x59F8B4


and can u give me 1 example of that timers...how to save it and how to load...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)