To help me
#1

How to make the specified instruction only allows the administrator to use
Reply
#2

if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "This command can only be used by an admin!!");

That is an RCON admin. In-game admins, you'll have to find a tutorial on how to create admin ranks and such.



https://sampforum.blast.hk/showthread.php?tid=273088

This does some of what you need, but a lot that you don't. But it may help you regardless. (It may be outdated, but it's still something to read over and learn from)
Reply
#3

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "This command can only be used by an admin!!");

That is an RCON admin. In-game admins, you'll have to find a tutorial on how to create admin ranks and such.



https://sampforum.blast.hk/showthread.php?tid=273088

This does some of what you need, but a lot that you don't. But it may help you regardless. (It may be outdated, but it's still something to read over and learn from)
But other instructions can not be used
Reply
#4

Come on, help me to come
Reply
#5

You want to learn to script by following the tutorials... Quite simply, you can't simply come in here, say what you want, and get it... Sure, someone could paste you code, but really, you're not going to learn it by simply having it pasted to you.

As for that line, put that in your commands that are for admins only, and no-one will be able to use those commands. You can have other commands that don't use that check, and end up executing for the players.

You want to look at DCMD (Command processing), and from there put that check in, but you should really use the Y_INI Tutorial for making accounts, then in there that gives you admin levels. From there you can then make your commands.


Rather than having !IsPlayerAdmin, you'll be able to use the pAdmin variable to track what level admin they are. So rather than having it "Admin : True" (Literally), you can then have thousands of different level admins. E.g. If(pAdmin[playerid]>5) and such.

Then, because of that, then you can make sure you, as a higher admin, can't be kicked/banned by lower level admins.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)