16.10.2010, 17:42
Just the short strategy:
Add a global variable, that holds the time of the last spawn change (with GetTickCount()). You will also have to store that value in the players ini.
Then, when he wants to change the spawn point, compare the stored time with the current tick time. If currenttime - storedtime < 86400000ms (24h) and > 0 (GetTickCount goes back to 0 every 24 days) abort the spawn change.
Add a global variable, that holds the time of the last spawn change (with GetTickCount()). You will also have to store that value in the players ini.
Then, when he wants to change the spawn point, compare the stored time with the current tick time. If currenttime - storedtime < 86400000ms (24h) and > 0 (GetTickCount goes back to 0 every 24 days) abort the spawn change.