Getting info from another script?
#1

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?
Reply
#2

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

Use PVars
Reply
#4

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)
Reply
#5

Thanks Turn, will try this.
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)