Question. - 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: Question. (
/showthread.php?tid=481231)
Question. -
Kyance - 14.12.2013
Is it possible to create a special "SendClientMessage" for certain level admins?
Like, if an level 1 types in "/acmds", he will only see Level 1 commands, but if a level 2 types "/acmds", he will be able to see Level 1 and Level 2 commands etc.
In short -
Level 1 - Can see Level 1 Commands only
Level 2 - Can see Level 1 and Level 2 Commands
Level 3 - Can see Level 1, Level 2 and Level 3 Commands
etc etc
Re: Question. -
Zamora - 14.12.2013
Yes..
pawn Код:
PlayerInfo[playerid][pAdmin] >= 1) return Sendclientmessage
PayerInfo[playerid][pAdmin] >= 2) return Sendclientmessage
And so on..
Re: Question. - Patrick - 14.12.2013
Yes, that is possible, example code shown below
pawn Код:
CMD:acmds( playerid, params[ ] )
{
if(adminlevel >= 1) SendClientMessage(playerid, -1, "adminlevel 1");
if(adminlevel >= 2) SendClientMessage(playerid, -1, "adminlevel 2");
if(adminlevel >= 3) SendClientMessage(playerid, -1, "adminlevel 3");
return true;
}
NOTE: Operator >= means larger or equal than the value.
EDIT: Too late, I was writing the meaning of the Operator
Re: Question. -
Kyance - 14.12.2013
Quote:
Originally Posted by pds2k12
Yes, that is possible, example code shown below
pawn Код:
CMD:acmds( playerid, params[ ] ) { if(adminlevel >= 1) SendClientMessage(playerid, -1, "adminlevel 1"); if(adminlevel >= 2) SendClientMessage(playerid, -1, "adminlevel 2"); if(adminlevel >= 3) SendClientMessage(playerid, -1, "adminlevel 3"); return true; }
NOTE: Operator >= means larger or equal than the value.
EDIT: Too late, I was writing the meaning of the Operator
|
Quote:
Originally Posted by Zamora
Yes..
pawn Код:
PlayerInfo[playerid][pAdmin] >= 1) return Sendclientmessage PayerInfo[playerid][pAdmin] >= 2) return Sendclientmessage
And so on..
|
Thank you both, +repped.
And pds2k12, i know the >= etc stuff