Command help
#1

If I have a command that needs RCON Admin to work how do I make it be for an admin level ex. 1337
Thanks.
Reply
#2

I don't fully understand your question, do you mean like this?

Код:
if(PlayerInfo[playerid][pAdmin] >= 1337)
Reply
#3

If the command detects if they ARE RCON Admin you'd replace it with:
pawn Код:
if(PlayerInfo[playerid][pAdmin] >= 1337)
How-ever if the command detects if they are not RCON Admin, you'd replace it with:
pawn Код:
if(PlayerInfo[playerid][pAdmin] < 1337)
Reply
#4

I meant if I have a filterscript for example the ******* Player and If I'm admin in game (Level 1337) and type the command it sais You are not RCON Admin, but I want it to be used for admin Level 1337 not RCON Admin
Reply
#5

Move your filterscript to your gamemode and replace IsPlayerAdmin with PlayerInfo[playerid][pAdmin] >= 1337

Or if you have made an include of your player's enum then include it in the filterscript.
Reply
#6

Use IsPlayerAdmin for check is player logged in to RCON or not.

__

U need to declare an array with a enumerator :

pawn Код:
enum playerdata
{
    pAdminLevel,
    pVIP
}

new pInfo[MAX_PLAYERS][playerdata];

CMD:testadmin(playerid, params[])
{
    if(!pInfo[playerid][pAdminLevel])) SendClientMessage(playerid, -1, "u aren't admin, sorry!");
    // more code
}
Reply
#7

Quote:
Originally Posted by VladimirMark
Посмотреть сообщение
I meant if I have a filterscript for example the ******* Player and If I'm admin in game (Level 1337) and type the command it sais You are not RCON Admin, but I want it to be used for admin Level 1337 not RCON Admin
Make a public function that returns the admin level in the gamemode and in the filterscript, make a function and use CallRemoteFunction to get the admin level.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)