[Help] In-Game Filterscripts Loader
#1

EDIT:
Fixed:
If you want to use a your command instead od /rcon loadfs fsname you can edit this command:
PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/load"true))
    {
       
SendRconCommand("loadfs cars");
       
SendClientMessage(playerid0xFFFFFFFF"SERVER: Loading cars.amx");
        return 
1;
        
// Returning 1 informs the server that the command has been processed.
        // OnPlayerCommandText won't be called in other scripts.
    
}
    return 
0;
    
// Returning 0 informs the server that the command hasn't been processed by this script.
    // OnPlayerCommandText will be called in other scripts until one returns 1.
    // If no scripts return 1, the 'SERVER: Unknown Command' message will be shown.

Else you can make it only for admin just changing this:
PHP код:
SendRconCommand("loadfs cars"); 
To:
PHP код:
if(IsPlayerAdmin(playerid))SendRconCommand("loadfs cars"); 
Thanks for Help
Reply
#2

pawn Код:
SendRconCommand("loadfs cars");
Try the above instead of

pawn Код:
SendRconCommand("filterscripts cars.amx");
Reply
#3

I just found that and it works but it need to be like:
Quote:

SendRconCommand("filterscripts cars");

without .amx
Thanks

Also I found that samp has built in this command for RCON in game so actually making FS loader is useless
PHP код:
##/rcon loadfs - Loads the given filterscript (example: /rcon loadfs adminfs). 
## /rcon unloadfs - Unload the given filterscript (example: /rcon unloadfs adminfs). 
## /rcon reloadfs - Reloads the given filterscript (example: /rcon reloadfs adminfs). 
I was looking for FS like this for some time and just missed somewhere this above. Again Thanks for help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)