Checking if a filterscript is running?
#1

How would I go about checking if a filterscript is running? I have this at the moment:

pawn Код:
COMMAND:refresh(playerid, params[])
{
    new firstParam[50], name[50];
    if(playerStats[playerid][Administrator] >= 4)
    {
        if(!sscanf(params, "ss", firstParam, name))
        {
            if(strcmp(firstParam, "filterscript", true) == 0)
            {
                if(FilterScriptIsRunning(name)) //This obviously won't work, but this is where it needs to go.
                {
                    new string[128];
                    format(string, sizeof(string), "reloadfs %s", name);
                    SendRconCommand(string);
                    format(string, sizeof(string), "INFO: %s.amx has been refreshed.", name);
                    SendClientMessage(playerid, sc_Lime, string);
                }
            }
            else { SendClientMessage(playerid, sc_LightRed, "ERROR: Invalid Parameter!"); SendClientMessage(playerid, sc_White, " PARAMETERS: filterscript"); }
        }
        else return SendClientMessage(playerid, sc_White, "COMMAND: /refresh [PARAM1(filterscript)] [Name of Parameter]");
    }
    else return ERROR_01;
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)