SA-MP Forums Archive
Put AdminLevel to FS - 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: Put AdminLevel to FS (/showthread.php?tid=504885)



Put AdminLevel to FS - [IND]Crazy - 06.04.2014

how to put AdminLevel to FS ?
I have this on my GM
pawn Код:
PlayerInfo[playerid][Level] >= 5
and how to put that script on FS ?


Re: Put AdminLevel to FS - Diogo123 - 06.04.2014

https://sampwiki.blast.hk/wiki/CallRemoteFunction


Re: Put AdminLevel to FS - Dubya - 06.04.2014

In the Gamemode, have this function:
pawn Код:
forward GetFSAdminLevel(playerid);
public GetFSAdminLevel(playerid)
{
    return PlayerInfo[playerid][Level];
}

// in the filterscript
stock GetAdminLevel(playerid)
{
    return CallRemoteFunction("GetFSAdminLevel", "i", playerid);
}

/*
in filterscript
now instead of:
    if (PlayerInfo[playerid][Level] >= 5)
use:
    if(GetAdminLevel(playerid) >= 5)
*/