SA-MP Forums Archive
Filterscript Command not Working - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Filterscript Command not Working (/showthread.php?tid=148374)



Filterscript Command not Working - TheNuttyScientist - 16.05.2010

Hello, I have created a filterscript in which is a /teleports command which creates a menu dialog. However, when I run the filterscript the command does not work. Also, no errors are experienced when I compile the FS


Re: Filterscript Command not Working - Las Venturas CNR - 16.05.2010

1. Make sure the fs name is inside server.cfg
2. Try putting the FS first, so like if you've got:

[code=line from server.cfg]filterscripts exmaple1 exmaple2 theoneweeretalkingabout[/code]

put "theoneweretalkingabout" which should be the name of the FS first. So for example it would now be:

[code=line from server.cfg]filterscripts theoneweeretalkingabout exmaple1 exmaple2[/code]


Re: Filterscript Command not Working - TheNuttyScientist - 16.05.2010

That hasn't worked.


Re: Filterscript Command not Working - TheNuttyScientist - 16.05.2010

Sorry for double posting, but I need this to be fixed.

Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(teleports, 9,cmdtext);
return 1;
}

dcmd_teleports(playerid, params[])
{
new teleports;
if(sscanf(params,"t", teleports)) return SendClientMessage(playerid, COLOR_GREEN, "USAGE : /teleports");
ShowPlayerDialog(playerid, TELEPORTS, DIALOG_STYLE_LIST, "Teleports", " Las Venturas\nLos Santos\nSan Fierro\nLiberty City\nBistro\nArch\nLoco Low\nTransfender\nJizzy's\nDonut Shop\nMeat Processing Plant\nTallest Building\nPirate Ship\nLS Airport\nSF Airport\nLV Airport\nGrove Street", "Teleport", "Cancel");
return 1;
}



Re: Filterscript Command not Working - Calgon - 16.05.2010

Quote:
Originally Posted by wiki
Returns Returning 0 in this callback will pass the command to another script or display 'SERVER: Unknown command' if there are no scripts to pass it on to
Return 0, instead of 1.


Re: Filterscript Command not Working - TheNuttyScientist - 16.05.2010

Nope. Nothing.


Re: Filterscript Command not Working - Calgon - 16.05.2010

I mean in both the GM and the FS.


Re: Filterscript Command not Working - TheNuttyScientist - 16.05.2010

Shall I add everything from the FS onto the GM, or just the command?