Question. - 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: Question. (
/showthread.php?tid=665662)
Question. -
Hazon - 12.04.2019
Is it a good idea to have a same commands in the gamemode and fs to avoid using of callfunction ? Would it have any issues ?
Re: Question. -
xRadical3 - 12.04.2019
In this case, only one command will respond. I've tested it before.
Re: Question. -
Hazon - 12.04.2019
hmm. Is there any way to make it work. Because I have some variables which I have to set = 0/1 and send message but idk how.
Re: Question. -
NaS - 12.04.2019
Quote:
Originally Posted by Vizi10
In this case, only one command will respond. I've tested it before.
|
You could make both respond if you return 0 in the filterscript and 1 in the gamemode (filterscript will be called first, returning 0 will continue calling it in other scripts until it reaches the gamemode, where returning 1 will prevent the Unknown Command message).
But this is a pretty hacky way to do it, CallRemoteFunction is the better solution in my opinion since you'll have more control over it.
Re: Question. -
Hazon - 12.04.2019
I'll go with return for now.