Jeffrey,

I put the code in serverplugin_empty.cpp.
And then used code *after @checkfile*:
@checkfile is for all clients, and executing it with: admin_execclient.

**************************************
fname = "Folder/file.bmp";
if (FileExists(fname)) {
total++;
**************************************

It will count the total of "total".
Then after all the other coding I have:

**************************************
Q_snprintf( gBuffer, 128, "say %s has %d found
files\n",playerinfo->GetName(),total);
engine->ServerCommand(gBuffer);
**************************************

It works. But only checks the file(s) on the server :(
I want it to check on the client.
Also tried with the code that Andre Bandarra gave, but still doesn't work.

Have you got any idea?


Frank 'anXiro' Weima


-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Jeffrey "botman"
Broome
Verzonden: woensdag 2 februari 2005 15:40
Aan: [email protected]
Onderwerp: Re: [hlcoders] Check if a file or folder exists at Client

Frank Weima wrote:
> Hi,
>
> I tried the folowing:

<snip>

Where did you put the code (in which .cpp file)?

Also, opening the file to check for existence is considered bad form
since you are changing the modification date of the file when you do
this.  Something like _stat() doesn't change any of the file properties.

--
Jeffrey "botman" Broome

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to