How to use Pvars??
#5

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
PVars COULD be used for this but it's a lousy way to do it here is what I would do.

1.) Create a getter function in your gamemode
pawn Код:
forward GetAdminLevel(playerid);
public GetAdminLevel(playerid) { return PlayerInfo[playerid][pAdmin]; }
2.) Create a include for your filterscripts
pawn Код:
#define GetAdminLevel(%0) CallRemoteFunction("GetAdminLevel", "i", %0)
3.) Now include that into your filterscripts and use GetAdminLevel(playerid)

I'm not going to recommend PVars you might ask why there reason is simple, they're bad coding practice you simply don't need them.

@Vince that is an interesting way to do it actually!
Thanks that worked.

EDIT: wait a minute i used
pawn Код:
if(GetAdminLevel(playerid) >= 3)
but it isnt getting their level, it just gets 0.

EDIT 2: Ohh works my mistake.
Reply


Messages In This Thread
How to use Pvars?? Still needs help!!! - by HitterHitman - 04.04.2014, 13:19
Re: How to use Pvars?? - by Vince - 04.04.2014, 13:29
Re: How to use Pvars?? - by Pottus - 04.04.2014, 13:31
Re: How to use Pvars?? - by HitterHitman - 04.04.2014, 13:37
Re: How to use Pvars?? - by HitterHitman - 04.04.2014, 13:58

Forum Jump:


Users browsing this thread: 2 Guest(s)