Posts: 19
Threads: 3
Joined: May 2015
Reputation:
0
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.
Posts: 889
Threads: 4
Joined: Mar 2013
Reputation:
0
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.
Posts: 8
Threads: 1
Joined: Apr 2014
Reputation:
0
use if(!(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You aren't admin!");
this works for rcon admins, hope i helped you.
Posts: 19
Threads: 3
Joined: May 2015
Reputation:
0
What do you mean track of admin permissions ? ?
Posts: 19
Threads: 3
Joined: May 2015
Reputation:
0
Where i have to use this if(!(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You aren't admin!"); ?
?
Posts: 8
Threads: 1
Joined: Apr 2014
Reputation:
0
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!"