SA-MP Forums Archive
ADmin CMD Permission HElp - 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: ADmin CMD Permission HElp (/showthread.php?tid=580677)



ADmin CMD Permission HElp - Strider1997 - 07.07.2015

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.


Re: Hello Help me huh ! - Sithis - 07.07.2015

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.


Re: Hello Help me huh ! - harman1hs1 - 07.07.2015

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

this works for rcon admins, hope i helped you.


Re: Hello Help me huh ! - Strider1997 - 07.07.2015

What do you mean track of admin permissions ? ?


Re: ADmin CMD Permission HElp - Strider1997 - 07.07.2015

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


Re: ADmin CMD Permission HElp - harman1hs1 - 07.07.2015

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!"


Re: ADmin CMD Permission HElp - Stev - 07.07.2015

Sigh...


Re: Hello Help me huh ! - Sithis - 07.07.2015

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] ?


Re: ADmin CMD Permission HElp - Strider1997 - 07.07.2015

yes i've that cmd


Re: ADmin CMD Permission HElp - Sithis - 07.07.2015

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.