18.12.2011, 17:46
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.
When I type a random sentence, nothing happens!
Then I made a filter script, to check if something happens over there:
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:
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:
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.
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;
}
Then I made a filter script, to check if something happens over there:
pawn Код:
public OnRconCommand(cmd[])
{
printf("FS");
return 1;
}
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'
}
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
PS: I think this is pretty re-creatable, I easily managed to re-create it using bare.pwn.