SA-MP Forums Archive
Using virables of other filterscript, is it possible? - 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: Using virables of other filterscript, is it possible? (/showthread.php?tid=528095)



Using virables of other filterscript, is it possible? - PMH - 26.07.2014

I have 2 big Filtescripts and i dont want to merge it since it will become more confusing.
so my 1st filterscript has a virable:
Код:
new InDM[MAX_PLAYERS]
now i want to check if it's 0 in another filterscript like this
Код:
if (InDM[playerid] == 0)
so how to use 1st fs variable in 2nd fs?


Re: Using virables of other filterscript, is it possible? - Swimor - 26.07.2014

Incognito's GVar plugin: https://sampforum.blast.hk/showthread.php?tid=151076


Re: Using virables of other filterscript, is it possible? - biker122 - 26.07.2014

Yes. Use SetPVarInt(playerid, "var", value), GetPVarInt(playerid, "var");


Re: Using virables of other filterscript, is it possible? - JM_Millers - 26.07.2014

Use PVar's


Re: Using virables of other filterscript, is it possible? - PMH - 26.07.2014

i know that, but is there a possiblity of using variables? i though CallRemoteFunction would do thatbut I do not how. so if somebody knows, tell me here.


Re: Using virables of other filterscript, is it possible? - Smileys - 26.07.2014

pawn Код:
forward GetSomething( playerid )
public GetSomething( playerid )
{
        return YourVariable;
}

// in your filterscript
new SomeVariable = CallRemoteFunction( "GetSomething", "i", playerid );
// now SomeVariable will hold the result of that function.



Re: Using virables of other filterscript, is it possible? - PMH - 26.07.2014

Quote:
Originally Posted by Smileys
Посмотреть сообщение
pawn Код:
forward GetSomething( playerid )
public GetSomething( playerid )
{
        return YourVariable;
}

// in your filterscript
new SomeVariable = CallRemoteFunction( "GetSomething", "i", playerid );
// now SomeVariable will hold the result of that function.
thnx for replying.
i dont knw how to use it so can u just give me short tutorial how i shud do that, i explained my fs variables in the topic. thank u +rep'ed