RCON input via console - Only works when a filterscript is loaded
#1

So I've stumbled upon a problem I've never seen before.

What I'm trying to do is make some sort of command by RCON input, using OnRconCommand (Pretty obvious). This is my code, just to check if anything is actually happening.
PS: This is in my game mode.
pawn Код:
public OnRconCommand(cmd[])
{
    printf("GM");
    return 1;
}
When I type a random sentence, nothing happens!

Then I made a filter script, to check if something happens over there:
pawn Код:
public OnRconCommand(cmd[])
{
    printf("FS");
    return 1;
}
If I type a random sentence, it indeed outputs 'FS'. That leaves me wondering why it works in a filter script, but not in my game mode!

After screwing around a bit, I change this in the filter script:
pawn Код:
public OnRconCommand(cmd[])
{
    printf("FS);
    return 0; //Changed 'return 1' to 'return 0'
}
When I type a random sentence having this filter script loaded, and still having the other code in my game mode, it outputs both 'FS' and 'GM'! Why does it work now, but not before?

This is the log:
Код:
hi
loadfs testscript (Using 'return 1')
    Filterscript 'testscript.amx' loaded.
hi
FS
loadfs testscript (Using 'return 0')
    Filterscript 'testscript.amx' unloaded.
    Filterscript 'testscript.amx' loaded.
hi
FS
GM
Has anyone got any idea what could be causing this?

PS: I think this is pretty re-creatable, I easily managed to re-create it using bare.pwn.
Reply


Messages In This Thread
RCON input via console - Only works when a filterscript is loaded - by Hiddos - 18.12.2011, 17:46
Re: RCON input via console - Only works when a filterscript is loaded - by Mikkel_Pedersen - 18.12.2011, 17:53
Re: RCON input via console - Only works when a filterscript is loaded - by Hiddos - 18.12.2011, 19:45
Re: RCON input via console - Only works when a filterscript is loaded - by Mikkel_Pedersen - 18.12.2011, 19:47

Forum Jump:


Users browsing this thread: 1 Guest(s)