Skip to content
iFarbod edited this page Jun 28, 2014 · 2 revisions

LoadFilterScript(scriptname[]);

Loads a Filterscript.

Parameters:

  • scriptname : Filterscript name to load.

Return Values:

  • Returns 0 if server version unknown.
  • Returns 0 also if filterscript is loaded successfully.

Example Usage :

// Fixing the /rcon loadfs [Scriptname] Bug (Can't load Filterscripts contain Spaces).
// /loadfs [Script Name] (Spaces accepted!)
CMD:loadfs(playerid, params[])
{
	new
		scriptname[64];

	if(!IsPlayerAdmin(playerid)) return 0; // Checking is player is already logged into RCON.
	if(sscanf(params, "s[64]", scriptname)) return SendClientMessage(playerid, 0xFF0000FF, "Syntax: /loadfs [Script name]");
	LoadFilterScript(scriptname);
	return 1; // Returning 1 to process Command in zCMD. Avioding "SERVER: Unknown Command." Message.
}