Triggering zcmd commands through filterscript
#1

Is there a way to trigger zcmd commands from a filterscript? (commands are in the gamemode itself)
Reply
#2

It might be possible, try this thing:
pawn Код:
//In your gamemode
forward CallCommand(playerid, params[]);
public CallCommand(playerid, params[])
{
    cmd_command(playerid, params);
    return 1;
}
 
// In your filterscript
CallRemoteFunction("CallCommand", "is", <some player id>, <some parameters string>);
I used this function: https://sampwiki.blast.hk/wiki/CallRemoteFunction
Reply
#3

Quote:
Originally Posted by arad55
Посмотреть сообщение
Is there a way to trigger zcmd commands from a filterscript? (commands are in the gamemode itself)
No, you cant do so by creating commands in filterscript.

Or, maybe you can use this
https://sampwiki.blast.hk/wiki/CallRemoteFunction
I am not sure though.
Reply
#4

Quote:
Originally Posted by $$inSane
Посмотреть сообщение
No, you cant do so by creating commands in filterscript.

Or, maybe you can use this
https://sampwiki.blast.hk/wiki/CallRemoteFunction
I am not sure though.
Yeah, I was using CallRemoteFunction, but apparently didn't think it'd work with "cmd_kick" or something, but it does. So I'm good. Thanks!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)