How to put DCMD
#1

How to put DCMD comands only for admins?

public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(count, 5, cmdtext);

return 0;
}

I want to put this command only for admins, any help?
Reply
#2

in the command you should make admin check.
Reply
#3

Quote:
Originally Posted by Rk_
in the command you should make admin check.
how?
Reply
#4

if(!IsPlayerAdmin(playerid)) return 1;
Reply
#5

Hi try this...




Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
 if (IsPlayerAdmin(playerid))//replace to your admin system.. Or keep it then it goes on rcon admin...
 {
 dcmd(count, 5, cmdtext);
 }
 return 0;
}
Reply
#6

but this is for rcon admins, if you want it for regular admins, replace it with the variable in which you show that someone is admin.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)