ADmin CMD Permission HElp
#1

public OnPlayerCommandText(playerid, cmdtext[])
{
if((strcmp("/acmds", cmdtext, true) == 0) || (strcmp("/admincommands", cmdtext, true) == 0))

i want this command to be used by admins only !!
Thanks IN Advance.
Reply
#2

First, please use a proper topic title so others may be able to more easily identify your issue.

Second, without knowing how you keep track of admin permissions, we cannot help you.
Reply
#3

use if(!(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You aren't admin!");

this works for rcon admins, hope i helped you.
Reply
#4

What do you mean track of admin permissions ? ?
Reply
#5

Where i have to use this if(!(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You aren't admin!"); ?
?
Reply
#6

before if((strcmp("/acmds", cmdtext, true) == 0) || (strcmp("/admincommands", cmdtext, true) == 0))

be sure that in game you use /rcon login <your rcon>

or it doesn't work and will say the error message "You aren't admin!"
Reply
#7

Sigh...
Reply
#8

Quote:
Originally Posted by Strider1997
Посмотреть сообщение
What do you mean track of admin permissions ? ?
If you have an admin or moderator in your server, how do you give them their rights? Do you have a command such as /setadmin [playerid] ?
Reply
#9

yes i've that cmd
Reply
#10

Quote:
Originally Posted by Strider1997
Посмотреть сообщение
yes i've that cmd
Please show the code of that command. If we know how the rights are assigned, we can help you with your problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)