SA-MP Forums Archive
Rcon Help - 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)
+--- Thread: Rcon Help (/showthread.php?tid=631514)



Rcon Help - silverms - 30.03.2017

hey so in my script I blocked the rcon so no one can log in but I need to make a /loadfs command and /unloadfs command I tried to do so but the problem is when I type the name of the fs it isn't loading it or unloading it here is my code:
PHP код:
CMD:loadfs(playeridparams[])
{
    if(
adlvl(playerid)<6) return 0;
    new 
str[256], fs[256];
    if(
sscanf(params"s"fs)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /loadfs [FilterScript]");
    
format(strsizeof(str), "loadfs %s",fs);
    
SendRconCommand(str);
    
format(strsizeof(str), "filterscript [%s] loaded"fs);
    
SendClientMessage(playeridCOLOR_WHITEstr);
    return 
1;
}
CMD:unloadfs(playeridparams[])
{
    if(
adlvl(playerid)<6) return 0;
    new 
str[256], fs[256];
    if(
sscanf(params"s"fs)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /unloadfs [FilterScript]");
    
format(strsizeof(str), "unloadfs %s",fs);
    
SendRconCommand(str);
    
format(strsizeof(str), "filterscript [%s] Unloaded"fs);
    
SendClientMessage(playerid,COLOR_WHITEstr);
    return 
1;




Re: Rcon Help - [eLg]elite - 30.03.2017

Try:
if(sscanf(params, "s[128]", fs)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /loadfs [FilterScript]");