Rcon Help
#1

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;

Reply
#2

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


Forum Jump:


Users browsing this thread: 1 Guest(s)