SA-MP Forums Archive
Filterscript working with gamemode - 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: Filterscript working with gamemode (/showthread.php?tid=644016)



Filterscript working with gamemode - DavidSF - 02.11.2017

Hello everyone!
Well, how can i add a filterscript working with gamemode. like i want to remove IsPlayerAdmin (in filterscript) and put the one (e.g: PlayerInfo) who in gamemode.


Re: Filterscript working with gamemode - Matz - 02.11.2017

Reading that information is impossible unless you read some data from the user file


Re: Filterscript working with gamemode - DavidSF - 02.11.2017

Quote:
Originally Posted by Matz
Посмотреть сообщение
Reading that information is impossible unless you read some data from the user file
then how can i take the user info?


Re: Filterscript working with gamemode - Lucases - 02.11.2017

Usually I implement the filterscript inside the gamemode, but it needs time and errors fix


Re: Filterscript working with gamemode - Konstantinos - 02.11.2017

There are couple of methods like CallRemoteFunction, properties, SVars, GVar plugin etc.

This is an example:
pawn Код:
// <filterscript>
#define GetPlayerAdmin(%0) CallRemoteFunction("GM_GetPlayerAdmin", "i", %0)

// <gamemode>
forward GM_GetPlayerAdmin(playerid);
public GM_GetPlayerAdmin(playerid) return PlayerInfo[playerid][pAdmin];