Variable for filterscript and gamemode - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Variable for filterscript and gamemode (
/showthread.php?tid=118570)
Variable for filterscript and gamemode -
nesty - 04.01.2010
hi, i've several problems with my user data script inside my gamemode so i decided to put it into a filterscript
but there is an another problem if i want to set a variable in my gamemode like:
pawn Code:
pMoneybags_found[playerid] ++;
it can't find it in the filterscript! And here is my question how i can set a variable for Gamemode and filterscript? (For Example EXTERN New pMoneybags_found[playerid])
Re: Variable for filterscript and gamemode -
MerLow - 04.01.2010
The easiest way is with an include.
Re: Variable for filterscript and gamemode -
nesty - 04.01.2010
sorry but i've never made a filterscript i always was scripting a gamemode, where i can include the variable?
Re: Variable for filterscript and gamemode -
MerLow - 04.01.2010
if I understand what you really want, you can create an include with your data script.
Re: Variable for filterscript and gamemode -
nesty - 04.01.2010
ok hope u will understand. How can i include the variables from the gm into the fs and from the fs into the gm, like this example:
pawn Code:
#include <FILTERSCRIPT:Myuserdatas>
?
Re: Variable for filterscript and gamemode -
MerLow - 04.01.2010
I don't know what you means "data script", but anyway you can put it in an include file (like you've said before: Myuserdatas.inc), store it at pawno/includes and in your gamemode:
I'm not sure if it's what you want.