30.03.2017, 19:29
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(playerid, params[])
{
if(adlvl(playerid)<6) return 0;
new str[256], fs[256];
if(sscanf(params, "s", fs)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /loadfs [FilterScript]");
format(str, sizeof(str), "loadfs %s",fs);
SendRconCommand(str);
format(str, sizeof(str), "filterscript [%s] loaded", fs);
SendClientMessage(playerid, COLOR_WHITE, str);
return 1;
}
CMD:unloadfs(playerid, params[])
{
if(adlvl(playerid)<6) return 0;
new str[256], fs[256];
if(sscanf(params, "s", fs)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /unloadfs [FilterScript]");
format(str, sizeof(str), "unloadfs %s",fs);
SendRconCommand(str);
format(str, sizeof(str), "filterscript [%s] Unloaded", fs);
SendClientMessage(playerid,COLOR_WHITE, str);
return 1;
}