communicating variabels(gm/fs)
#2

Ok, I'll explain. Using CallRemoteFunction you can call any public function from any filterscript or gamemode. The function must always be public. In your case, because you have no parameters, you only need this:
pawn Код:
//in gamemode
CallRemoteFunction("afterstop", "");
Below is an example if you had multiple parameters:
pawn Код:
//in gamemode
public OnPlayerConnect(playerid)
{
    CallRemoteFunction("MyFunc", "ds", playerid, "connected");
}

//in filterscript
public MyFunc(playerid, text[])
{
    printf("playerid %d has %s.", playerid, text);
}
If you had MyFunc in two filterscripts, it would print that message two times.
Reply


Messages In This Thread
communicating variabels(gm/fs) - by Baboon - 02.02.2011, 15:43
Re: communicating variabels(gm/fs) - by Stylock - 02.02.2011, 17:59

Forum Jump:


Users browsing this thread: 1 Guest(s)