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

UnLoadFilterScript(scriptname[]);

Unloads a Filterscript.

Parameters:

  • scriptname : Filterscript name to unload.

Return Values:

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

Example Usage :

// Fixing the /rcon unloadfs [Scriptname] Bug (Can't unload Filterscripts contain Spaces).
// /unloadfs [Script Name] (Spaces accepted!)
CMD:unloadfs(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: /unloadfs [Script name]");
	UnLoadFilterScript(scriptname);
	return 1; // Returning 1 to process Command in zCMD. Avioding "SERVER: Unknown Command." Message.
}