Triggering zcmd commands through filterscript - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Triggering zcmd commands through filterscript (
/showthread.php?tid=563825)
Triggering zcmd commands through filterscript -
arad55 - 17.02.2015
Is there a way to trigger zcmd commands from a filterscript? (commands are in the gamemode itself)
Re: Triggering zcmd commands through filterscript -
HazardouS - 17.02.2015
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
Re: Triggering zcmd commands through filterscript -
$$inSane - 17.02.2015
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.
Re: Triggering zcmd commands through filterscript -
arad55 - 17.02.2015
Quote:
Originally Posted by $$inSane
|
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!