Quote:
Originally Posted by djromero
Just rewrite the following function like this:
Code:
StripAndExecuteClientCommand(client, const String:command[], param) {
// Removes sv_cheat flag from command
new flags = GetCommandFlags(command);
SetCommandFlags(command, flags & ~FCVAR_CHEAT);
ClientCommand(client, "%s %d", command, param)
// Restore sv_cheat flag on command
SetCommandFlags(command, flags);
}
Now it won't require sv_cheats.
I took the liberty of posting the fixed plugin:
|
This code wouldn't work unless you use FakeClientCommand.
Just because ClientCommand makes the command in client's console while FakeClientCommand simulates the command as the client did in the same frame. FakeClientCommandEx simulates like FakeClientCommand but in the next frame.