Est FileExists

From EventScripts Community Encyclopedia
Syntax: est_FileExists <return> <"file">
Note: Command parameters are described inside the < and > characters. Optional parameters are contained within [ and ] characters.

Description

Checks to see if a file exists on the server. Returns 1 if file is found, or 0 if it is not or -1 if access was denied.

Parameters

  • return - Variable to store the result
  • "file" - Path of the file you are checking for

Example


event es_map_start
{
	es_set existvar 0
 
	est_FileExists existvar "models/custom_model/Admin.mdl"
	if (server_var(existvar) equalto 0) do
	{
		echo Error Model not located on the server
	}
}
blog comments powered by Disqus