SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 05/07/2013, 03:48 PM   #1
redreaper666
Huge Clucker
 
redreaper666's Avatar
 
Join Date: Nov 2011
Location: Mapping my Room and Scripting my Life
Posts: 246
Reputation: 73
Default Easy Load/Unload/Reload FS ingame

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

Code:
//   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.
__________________
Redreaper666's Creations:
______________________________
>[Server] Working together on DD/DM Deathmatch - Xtreme DM by Himself ||
>[Filterscripts]
-[FS]Neon4Cars:http://forum.sa-mp.com/showthread.ph...26#post2551026
-[FS]Working Ferris Wheel:http://forum.sa-mp.com/showthread.php?t=417814
-[FS]Driveable Wheelchair:http://forum.sa-mp.com/showthread.php?t=416883
-[FS]Easy Load/Unload/Reloadfs System: http://forum.sa-mp.com/showthread.ph...73#post2599573
>[Maps]
-[Map]GtaII Map:http://forum.sa-mp.com/showthread.php?t=303460
>Nothing is impossible<

Last edited by redreaper666; 06/07/2013 at 09:58 AM.
redreaper666 is offline   Reply With Quote
Old 05/07/2013, 03:50 PM   #2
Krakuski
Huge Clucker
 
Krakuski's Avatar
 
Join Date: Jul 2012
Location: Japan
Posts: 213
Reputation: 18
Default Re: Easy Load/Unload/Reload FS ingame

Nice Good work.
Krakuski is offline   Reply With Quote
Old 05/07/2013, 03:57 PM   #3
DemonRider
Big Clucker
 
DemonRider's Avatar
 
Join Date: Mar 2012
Posts: 130
Reputation: 12
Default Re: Easy Load/Unload/Reload FS ingame

Awesome , Nice work ++++rep
DemonRider is offline   Reply With Quote
Old 05/07/2013, 10:08 PM   #4
sjvt
Gangsta
 
sjvt's Avatar
 
Join Date: Nov 2009
Location: The Netherlands
Posts: 990
Reputation: 60
Default Re: Easy Load/Unload/Reload FS ingame

Whats the point?
Just /rcon login password and then /rcon unloadfs name, /rcon loadfs name, /rcon reloadfs name
sjvt is offline   Reply With Quote
Old 05/07/2013, 10:12 PM   #5
JustBored
High-roller
 
JustBored's Avatar
 
Join Date: Jan 2013
Location: Buenos Aires - Argentina
Posts: 1,172
Reputation: 134
Default Respuesta: Easy Load/Unload/Reload FS ingame

Actually it has a bug, you didnt specified the amount of cells that the string has.
Code:
if(sscanf(params, "s", fsname)) return SendClientMessage(playerid, -1, "{F81414}COMMAND: {FFFFFF}/reloadfs <fsname>");
You should put:
Code:
if(sscanf(params, "s[30]", fsname)) return SendClientMessage(playerid, -1, "{F81414}COMMAND: {FFFFFF}/reloadfs <fsname>");
__________________
"Compiler - A program designed to tell you how wrong you are. It's a great way to induce stress and frustration."

JustBored is offline   Reply With Quote
Old 05/07/2013, 10:17 PM   #6
Pottus
Godfather
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 5,424
Reputation: 1238
Default Re: Easy Load/Unload/Reload FS ingame

You could make this a lot better by using a plugin to get all the amx files in the filterscripts folder then just generate a dialog list to select which one to load.
Pottus is offline   Reply With Quote
Old 06/07/2013, 07:25 AM   #7
redreaper666
Huge Clucker
 
redreaper666's Avatar
 
Join Date: Nov 2011
Location: Mapping my Room and Scripting my Life
Posts: 246
Reputation: 73
Default Re: Easy Load/Unload/Reload FS ingame

As i said i want to keep this not (complicated) as it is just for testing other filterscripts on an Testing Ground GM.
And also i dont like using plugins that other people did except of streamer plugins.

Changed:

Code:
if(sscanf(params, "s", fsname)) return SendClientMessage(playerid, -1, "{F81414}COMMAND: {FFFFFF}/reloadfs <fsname>");
Code:
if(sscanf(params, "s[30]", fsname)) return SendClientMessage(playerid, -1, "{F81414}COMMAND: {FFFFFF}/reloadfs <fsname>");
Thanks for info
__________________
Redreaper666's Creations:
______________________________
>[Server] Working together on DD/DM Deathmatch - Xtreme DM by Himself ||
>[Filterscripts]
-[FS]Neon4Cars:http://forum.sa-mp.com/showthread.ph...26#post2551026
-[FS]Working Ferris Wheel:http://forum.sa-mp.com/showthread.php?t=417814
-[FS]Driveable Wheelchair:http://forum.sa-mp.com/showthread.php?t=416883
-[FS]Easy Load/Unload/Reloadfs System: http://forum.sa-mp.com/showthread.ph...73#post2599573
>[Maps]
-[Map]GtaII Map:http://forum.sa-mp.com/showthread.php?t=303460
>Nothing is impossible<

Last edited by redreaper666; 06/07/2013 at 09:57 AM.
redreaper666 is offline   Reply With Quote
Old 06/07/2013, 08:28 AM   #8
Mckarlis
Banned
 
Join Date: Jun 2013
Location: England
Posts: 800
Reputation: 86
Default Re: Easy Load/Unload/Reload FS ingame

Nice job.
Mckarlis is offline   Reply With Quote
Old 26/07/2013, 08:44 AM   #9
John_Tylor
Big Clucker
 
John_Tylor's Avatar
 
Join Date: Aug 2011
Posts: 77
Reputation: -19
Default Re: Easy Load/Unload/Reload FS ingame

Great job +Rep
__________________
IF it helped you +1Reputation me. Thanks..
Skype:john.tylor11
John_Tylor is offline   Reply With Quote
Old 04/08/2015, 01:47 AM   #10
MuhsinunCool
Little Clucker
 
Join Date: Jul 2015
Posts: 1
Reputation: 0
Default Re: Easy Load/Unload/Reload FS ingame

I need help with this please i don't understand how to compile the .pwn file to .amx with pawno it says:
Code:
C:\MAHFOLDERBLAHBLAH\FilterScriptLoaderUnloaderReloader.pwn (4) : fatal error 100: cannot read from file: "zcmd"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
can u help me please? I copied the code then pasted it in a new text document then saved it as FilterScriptLoaderUnloaderReloader.pwn as all files then opened it in pawno then tried to compile it can someone tell me how to do this? Sorry im a noob at this
MuhsinunCool is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Load/Unload vehicle ZeroCools Scripting Help 2 24/02/2013 07:44 AM
[Map] A House and A Truck Load/Unload Point Tuntun Maps 8 21/06/2012 07:24 PM
[Map] Map At Lv Side Truck/Heilcopter Load/unload point Tuntun Maps 4 20/05/2012 09:16 AM
[Map] Truck Mission's Load/unload Point Tuntun Maps 7 19/05/2012 07:19 AM


All times are GMT. The time now is 11:11 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.