FS's and GM's communicating
#1

Hi,
I remember that there was a way to, under certain circumstances, get a gamemode to communicate with an FS.

For example, if the GM connects to MySQL, you could get the Fs to check permissions via the GM.

I don't know how to do this. Does anyone know
Thanks
Matt
Reply
#2

Simplest way I can think of is to use CallRemoteFunction.

Example:
OnGameMode
pawn Code:
enum Information
{
  cash,
  admin,
  level,
}
new pInfo[MAX_PLAYERS][Information];
public OnPlayerConnect(playerid)
{
  CallRemoteFunction("GetVars","iiii",playerid,pInfo[playerid][cash],pInfo[playerid][admin],pInfo[playerid][level]);
  return 1;
}
On Filterscript
pawn Code:
forward GetVars(playerid,cash,admin,level);
enum Information
{
  cash,
  admin,
  level,
}
new pInfo[MAX_PLAYERS][Information];
public GetVars(playerid,cash,admin,level)
{
  pInfo[playerid][cash]=cash;
  pInfo[playerid][admin]=admin;
  pInfo[playerid][level]=level;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)