Is this possible?
#1

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?
Reply
#2

#define check_admin CheckAdmin(playerid)

Should be used where "playerid" exists.
Reply
#3

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
#define check_admin CheckAdmin(playerid)

Should be used where "playerid" exists.
Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)