fileManager.fileExists new discovery
Posted: Sun May 30, 2021 6:34 pm
The fileManager.fileExists command allows you to check if any file located in your main BF1942 directory and its subfolders exists or not.
Recently I found that this command can also be used to check for file types as well. This is done by using an asterix, followed by the file extension, as the argument. Example below:
This will check for the existence of files with the RFA extension. If at least one file with that extension exists, the command returns True. I've tested this in the Debugger as well as in a local BF1942 server.
This command could be useful to verify if a client is not running illegal files (cheats). You can modify the code to check if the main directory and any folder in it contains illegal DLLs or EXEs:
Combined with conditional statements, one can then create a basic file checking script to block unallowed files.
Recently I found that this command can also be used to check for file types as well. This is done by using an asterix, followed by the file extension, as the argument. Example below:
Code: Select all
fileManager.fileExists *.rfa
This command could be useful to verify if a client is not running illegal files (cheats). You can modify the code to check if the main directory and any folder in it contains illegal DLLs or EXEs:
Code: Select all
fileManager.fileExists *.dll
fileManager.fileExists *.exe