[FilterScript] Easy Load/Unload/Reload FS ingame
#1

Hi guys.
As i am sick of having to Load/Unload/Reload any FS i want through the rcon or console i made myself a little script that also might can help you out.
With it you can Load/Unload/Reload any Filterscript way faster.

Command Usement:
/loadfs/unloadfs/reloadfs fsname

Код:
//   Easy Load/Unload/Reload FS System By Redreaper666 || V1.0
//----------------------- INCLUDES ---------------------------------------------
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#include <foreach>
//----------------------- DEFINES ----------------------------------------------
#define COLOR_RED 0xDD0000AA
#define COLOR_GREEN 0x008000FF
//----------------------- STOCKS ----------------------------------------------
stock GetName(playerid)
{
    new PlayerName[MAX_PLAYER_NAME];
	GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
	return PlayerName;
}
//------------------------------------------------------------------------------
CMD:reloadfs(playerid, params[])
{
	new string[128],string2[128];
	new fsname;
	if(sscanf(params, "s[30]", fsname)) return SendClientMessage(playerid, -1, "{F81414}COMMAND: {FFFFFF}/reloadfs <fsname>");
	format(string,sizeof(string),"%s reloaded Filterscript: %s",GetName(playerid),fsname);
	format(string2,sizeof(string2),"reloadfs %s",fsname);
	SendRconCommand(string2);
	foreach(Player, i)
	{
	SendClientMessage(i,COLOR_GREEN,string);
	}
	return 1;
}
//------------------------------------------------------------------------------
CMD:loadfs(playerid, params[])
{
	new string[128],string2[128];
	new fsname;
	if(sscanf(params, "s[30]", fsname)) return SendClientMessage(playerid, -1, "{F81414}COMMAND: {FFFFFF}/loadfs <fsname>");
	format(string,sizeof(string),"%s loaded Filterscript: %s",GetName(playerid),fsname);
	format(string2,sizeof(string2),"loadfs %s",fsname);
	SendRconCommand(string2);
	foreach(Player, i)
	{
	SendClientMessage(i,COLOR_GREEN,string);
	}
	return 1;
}
//------------------------------------------------------------------------------
CMD:unloadfs(playerid, params[])
{
	new string[128],string2[128];
	new fsname;
	if(sscanf(params, "s[30]", fsname)) return SendClientMessage(playerid, -1, "{F81414}COMMAND: {FFFFFF}/unloadfs <fsname>");
	format(string,sizeof(string),"%s unloaded Filterscript: %s",GetName(playerid),fsname);
	format(string2,sizeof(string2),"unloadfs %s",fsname);
	SendRconCommand(string2);
	foreach(Player, i)
	{
	SendClientMessage(i,COLOR_RED,string);
	}
	return 1;
}
//------------------------------------------------------------------------------
Bugs:
None known so far.

PS:
Im working on to advance it so that you can get a list which Filterscripts you already got loaded.
Reply


Messages In This Thread
Easy Load/Unload/Reload FS ingame - by redreaper666 - 05.07.2013, 15:48
Re: Easy Load/Unload/Reload FS ingame - by Krakuski - 05.07.2013, 15:50
Re: Easy Load/Unload/Reload FS ingame - by DemonRider - 05.07.2013, 15:57
Re: Easy Load/Unload/Reload FS ingame - by sjvt - 05.07.2013, 22:08
Respuesta: Easy Load/Unload/Reload FS ingame - by JustBored - 05.07.2013, 22:12
Re: Easy Load/Unload/Reload FS ingame - by Pottus - 05.07.2013, 22:17
Re: Easy Load/Unload/Reload FS ingame - by redreaper666 - 06.07.2013, 07:25
Re: Easy Load/Unload/Reload FS ingame - by Mckarlis - 06.07.2013, 08:28
Re: Easy Load/Unload/Reload FS ingame - by John_Tylor - 26.07.2013, 08:44
Re: Easy Load/Unload/Reload FS ingame - by MuhsinunCool - 04.08.2015, 01:47
Re: Easy Load/Unload/Reload FS ingame - by MrSwift - 04.08.2015, 18:59

Forum Jump:


Users browsing this thread: 3 Guest(s)