Is this possible? - 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: Is this possible? (
/showthread.php?tid=616047)
Is this possible? -
danielpalade - 30.08.2016
Hi.
I'm trying to make a function which will check if the user is an admin or not.
The function would be something like "check_admin" or something like that, but it won't have any parameters.
I was thinking of using #define, and making a "stock" to return a message if the player is not an admin, so:
* Stock name: CheckAdmin(playerid)
Код:
#define check_admin(%0) CheckAdmin(%0)
But this uses parameters as well. My question is, is there anyway to automatic grab the playerid of the user who ran the command?
Re: Is this possible? -
SickAttack - 30.08.2016
#define check_admin CheckAdmin(playerid)
Should be used where "playerid" exists.
Re: Is this possible? -
danielpalade - 30.08.2016
Quote:
Originally Posted by SickAttack
#define check_admin CheckAdmin(playerid)
Should be used where "playerid" exists.
|
Thanks!