30.09.2010, 15:01
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.
I use dini for that.

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:
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? |
pawn Код:
new disctime = dini_Int(file,"DiscTime");
if(!disctime) return 0;