Raised This Month: $ Target: $400
 0% 

native file_exists


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
notahacker
Member
Join Date: Jan 2015
Old 01-15-2017 , 11:42   native file_exists
Reply With Quote #1

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
notahacker is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 01-15-2017 , 11:45   Re: native file_exists
Reply With Quote #2

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

Last edited by jimaway; 01-15-2017 at 11:45.
jimaway is offline
notahacker
Member
Join Date: Jan 2015
Old 01-15-2017 , 11:55   Re: native file_exists
Reply With Quote #3

Quote:
Originally Posted by jimaway View Post
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
notahacker is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 01-15-2017 , 12:39   Re: native file_exists
Reply With Quote #4

You can't check the client files with that native, only server files.
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-15-2017 , 14:08   Re: native file_exists
Reply With Quote #5

You can force file consistency with this plugin by Connor.
__________________
fysiks is online now
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-15-2017 , 17:25   Re: native file_exists
Reply With Quote #6

What about this? - https://www.amxmodx.org/api/amxmodx/force_unmodified
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-15-2017 , 18:09   Re: native file_exists
Reply With Quote #7

Which is what the plugin I posted uses.
__________________
fysiks is online now
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:29.


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