Regarding fseek()
#3

I'm afraid that is not possible, only in SQL. I recommand you changing to it.
If you still wan't to stay with file function do this:
create a file, where all cops will be listed.
When a cop starts working insert his name in to the file.
When he stops working - remove his name.
And i think you can make the check yourself.

Quote:
Originally Posted by xxxDunecatxxx
Посмотреть сообщение
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 use dini for that.
pawn Код:
new disctime = dini_Int(file,"DiscTime");
            if(!disctime) return 0;
Reply


Messages In This Thread
Regarding fseek() - by xxxDunecatxxx - 30.09.2010, 11:54
Re: Regarding fseek() - by xxxDunecatxxx - 30.09.2010, 12:53
Re: Regarding fseek() - by wups - 30.09.2010, 15:01
Re: Regarding fseek() - by xxxDunecatxxx - 30.09.2010, 15:29
Re: Regarding fseek() - by wups - 30.09.2010, 15:34
Re: Regarding fseek() - by xxxDunecatxxx - 30.09.2010, 17:43
Re: Regarding fseek() - by Sergei - 30.09.2010, 17:52
Re: Regarding fseek() - by xxxDunecatxxx - 30.09.2010, 18:13

Forum Jump:


Users browsing this thread: 1 Guest(s)