30.09.2010, 12:53
Oh also I have one more question regarding files. I'm not going to make a new thread for it so I'll just post here.
I just made a new system that detects how long a player has been offline, it uses gettime() on disconnect and stores it as "DiscTime" in their ini file, and I made a command that does gettime() - <playerfilegettime> and it returns how many seconds they've been offline.
One problem though, I used this command on a player that doesn't have "DiscTime" created in their ini file, and it crashed my server. I use dini to get values and it works perfectly.
What would I need to use to see if they have "DiscTime" created in their ini file? fseek? fread?
I just made a new system that detects how long a player has been offline, it uses gettime() on disconnect and stores it as "DiscTime" in their ini file, and I made a command that does gettime() - <playerfilegettime> and it returns how many seconds they've been offline.
One problem though, I used this command on a player that doesn't have "DiscTime" created in their ini file, and it crashed my server. I use dini to get values and it works perfectly.
What would I need to use to see if they have "DiscTime" created in their ini file? fseek? fread?

