SA-MP Forums Archive
Getting info from another script? - 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: Getting info from another script? (/showthread.php?tid=554592)



Getting info from another script? - acade - 04.01.2015

Hey, someone has asked me to make a FS for them and I am wanting to get some info off their script. I need to know if they are in a faction, so I have this
pawn Код:
if(PlayerInfo[playerid][pMember] == 7)
How can I check if they are in the faction from a FS?


Re: Getting info from another script? - CalvinC - 04.01.2015

Just put the FS scripting in your gamemode, if you know how to.
Etc. delete OnFilterScriptInit/Exit.


Re: Getting info from another script? - BroZeus - 04.01.2015

Use PVars


Re: Getting info from another script? - Write - 04.01.2015

Put this inside of the gamemode.

pawn Код:
forward MemberCheck(playerid);
public MemberCheck(playerid) { return PlayerInfo[playerid][pMember]; }
And this inside of the filterscript you are going to call the function from.

pawn Код:
stock MemberCheck(playerid)
{
    return CallRemoteFunction("MemberCheck", "i", playerid);
}
And then inside of the filterscript you go like:

pawn Код:
if(MemberCheck(playerid) == 7)



Re: Getting info from another script? - acade - 04.01.2015

Thanks Turn, will try this.


Re: Getting info from another script? - Lordzy - 04.01.2015

In addition to what Turn said, there's a tutorial which I created on remote functions. You can check that out if there's anything to clarify : https://sampforum.blast.hk/showthread.php?tid=516617