05-06-2009, 10:42 AM
I got this one working for my server...
Store the spawn weapon info in a sepperate file, or db.
use gettime(); and save that in the file too..
then when the player reconnects, regardless of their ip, because some timeouts / crashes happen if the internet goes dead too you know

So... when they connect, gather the info from the players temp saved file, firstly gather the saved time..
it should be a shit ass long number in seconds. Save that as something imaginative like erm... "TimeStamp"
then compare the current time with the saved time..
new CurrentTime = gettime();
if(CurrentTime >= TimeStamp + 901) 901 = 15minutes and 1 second..
So if its past the 15 minute mark, you can clear the saved info, and not read any further info from the file...
but if it isnt past the 15minute mark.. either use "else" or you can use..
if(CurrentTime <= TimeStamp + 900)
Then go ahead and read the rest of the info, ammo amounts and spawnarmour 1 or 0.
Thats basically how i did it.
Store the spawn weapon info in a sepperate file, or db.
use gettime(); and save that in the file too..
then when the player reconnects, regardless of their ip, because some timeouts / crashes happen if the internet goes dead too you know

So... when they connect, gather the info from the players temp saved file, firstly gather the saved time..
it should be a shit ass long number in seconds. Save that as something imaginative like erm... "TimeStamp"
then compare the current time with the saved time..
new CurrentTime = gettime();
if(CurrentTime >= TimeStamp + 901) 901 = 15minutes and 1 second..
So if its past the 15 minute mark, you can clear the saved info, and not read any further info from the file...
but if it isnt past the 15minute mark.. either use "else" or you can use..
if(CurrentTime <= TimeStamp + 900)
Then go ahead and read the rest of the info, ammo amounts and spawnarmour 1 or 0.
Thats basically how i did it.
![[Image: 28u7ic8.gif]](http://i51.tinypic.com/28u7ic8.gif)