Posts: 111
	Threads: 10
	Joined: Jun 2011
	
	
 
	
	
		This is a very good idea !!!
I tryed it, but it don't work for me ...
How must I use it ? Can anybody explain me step by step please ? Because my server returns unknow command ...
Thanks =)
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 111
	Threads: 10
	Joined: Jun 2011
	
	
 
	
	
		
 I don't want to ban, I want to know how to use this filterscript ^^
	
 
	
	
	
		
	
 
 
	
	
	
		
	Posts: 111
	Threads: 10
	Joined: Jun 2011
	
	
 
	
	
		It works perfectly for me now. But I had a problem : everyone could use /exec command ! So I little changed the filterscript and it is now :
pawn Код:
#include <a_samp>
#define ERROR_OUT_OF_MEMORY_SOURCES 0
#define ERROR_BAD_FORMAT 11
#define ERROR_FILE_NOT_FOUND 2
#define ERROR_PATH_NOT_FOUND 3
native WinExec(execPath[]);
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/exec", true, 5))
    {
        if (!IsPlayerAdmin(playerid))
        return SendClientMessage(playerid, 0xFF0000AA, "You are not an admin ! !");
        else if(cmdtext[5] != ' ' || cmdtext[6] == EOS)
        return SendClientMessage(playerid, 0xFF0000FF, "/exec [command]");
        else
        {
        
        new
            File: execFile,
            pawnScript[256]
        ;
        execFile = fopen("ExecFS.pwn", io_write);
        
        if(execFile)
        {
            strcat(pawnScript, "#include <a_samp>\r\n\r\n");
            strcat(pawnScript, "public OnFilterScriptInit()\r\n");
            strcat(pawnScript, "{\r\n\t");
            strcat(pawnScript, cmdtext[6]);
            strcat(pawnScript, "\r\n}");
            
            fwrite(execFile, pawnScript);
            fclose(execFile);
            
            if(WinExec("pawno\\pawncc.exe ./scriptfiles/ExecFS.pwn"))
            {
                SetTimer("ReloadFS", 50, 0);
                return 1;
            }
            else return SendClientMessage(playerid, -1, "WinExec is unable to execute pawncc.exe!");
        }
        return 0;
        
        }
    }
    return 0;
}
forward ReloadFS();
public ReloadFS()
{
    if(fexist("ExecFS.amx"))
        SendRconCommand("reloadfs ../scriptfiles/ExecFS");
}
 
Now, you must be admin to use the command.
	
		
	
 
 
	
	
	
		
	Posts: 209
	Threads: 27
	Joined: Sep 2009
	
Reputation: 
0
	 
	
	
		----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3c, ©2005-2010 SA-MP Team
[23:43:12] filterscripts = ""  (string)
[23:43:12] 
[23:43:12] Server Plugins
[23:43:12] --------------
[23:43:12]  Loading plugin: WinExec
[23:43:12]   Failed.
[23:43:12]  Loaded 0 plugins.
[23:43:12] 
[23:43:12] Ban list
[23:43:12] --------
[23:43:12]  Loaded: samp.ban
[23:43:12] 
[23:43:12] 
[23:43:12] Filter Scripts
[23:43:12] ---------------
[23:43:12]   Loaded 0 filter scripts.
[23:43:12] Minimode loaded
[23:43:12] Number of vehicle models: 0
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 245
	Threads: 39
	Joined: Mar 2011
	
Reputation: 
0
	 
	
	
		looks a bit hard to use ,but thanks bro
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 496
	Threads: 54
	Joined: Nov 2011
	
Reputation: 
0
	 
	
	
		That's an amazing filterscript.
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 320
	Threads: 16
	Joined: Feb 2012
	
	
 
	
	
		Pretty amazing.
I've remembered I coded something a like once back in 2010 for a small community and it was useless because you still need to restart the server so just hit compile on pawno then GMX.
	
	
	
	
		
	
 
 
	
	
			Guest4390857394857 
			
				Unregistered
				
				
			
	
	
		
 
	
 
 
	
	
	
		
	Posts: 81
	Threads: 2
	Joined: Jul 2013
	
Reputation: 
0
	 
	
	
		Thanks dude, love you for4ver for this cool script !