AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   native file_exists (https://forums.alliedmods.net/showthread.php?t=292836)

notahacker 01-15-2017 11:42

native file_exists
 
Hi Friends,

Can anyone give me a working example of the native file_exists(const file[]); function.
Let's say for example, we want to check if a player has a specific XYZ.MDL file when connecting to the server. if player don't have XYZ.MDL, he get kick.

Thanks :)

jimaway 01-15-2017 11:45

Re: native file_exists
 
file_exist() is used to check for files on the servers filesystem.

just precache the model file and it will be downloaded automatically on the client if not present

notahacker 01-15-2017 11:55

Re: native file_exists
 
Quote:

Originally Posted by jimaway (Post 2486763)
file_exist() is used to check for files on the servers filesystem.

just precache the model file and it will be downloaded automatically on the client if not present


Alright. And what about checking if the file on the server is the same as the client? Just like the OpenGL Detector. Can you write me a simple example to compare a file on the server to the client's file.

Thanks

Craxor 01-15-2017 12:39

Re: native file_exists
 
You can't check the client files with that native, only server files.

fysiks 01-15-2017 14:08

Re: native file_exists
 
You can force file consistency with this plugin by Connor.

OciXCrom 01-15-2017 17:25

Re: native file_exists
 
What about this? - https://www.amxmodx.org/api/amxmodx/force_unmodified

fysiks 01-15-2017 18:09

Re: native file_exists
 
Which is what the plugin I posted uses.


All times are GMT -4. The time now is 21:01.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.