SA-MP Forums Archive
FS - 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: FS (/showthread.php?tid=68665)



FS - Schock - 12.03.2009

hey guys i create a new FS but if i enter it to server.cfg and start server the commands from GM and all other FS dont work anymore (i unload my FS and all other commands work)
can someone tell me why?


Re: FS - Dujma - 12.03.2009

Probably some variables from one FS shadows other FS commands


Re: FS - luby - 12.03.2009

do you have return 0; in this FS in OnPlayerCommandText at the end of this func?


Re: FS - Schock - 12.03.2009

thats my onplayercommandtext:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/...", cmdtext, true) == 0)
    {
    ...
    }
    return 1;
}



Re: FS - MenaceX^ - 12.03.2009

Quote:
Originally Posted by Schock
thats my onplayercommandtext:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/...", cmdtext, true) == 0)
    {
    ...
    }
   return 1;
}
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(!strcmp(cmd,"/command",true))
  {
    return 1;
  }
  return 0;
}



Re: FS - xcasio - 12.03.2009

Returning 0 is required for it to pass to the other filterscripts. If you return 1 you basically say "I found the command in this script, stop the search".