SA-MP Forums Archive
Command 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: Command help (/showthread.php?tid=517295)



Command help - VladimirMark - 04.06.2014

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


Re: Command help - eXeDev - 04.06.2014

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

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



Re: Command help - Abagail - 04.06.2014

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)



Re: Command help - VladimirMark - 04.06.2014

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


Re: Command help - iOxide - 04.06.2014

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.


Re: Command help - iFarbod - 04.06.2014

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
}



Re: Command help - Konstantinos - 04.06.2014

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.