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: Help (
/showthread.php?tid=553155)
Help -
sas10 - 28.12.2014
Hello Guys
Today i Want Know Best Way To i Done Making Admin Cmds i Have Admin Rank from 1 to 8
Now
i Want Know When i Write /Acmds Show To Me The Commands My Rank
Example if im Rank 2 Showing To Me The CMDS if im rank 7 Show To Me My CMDS in one commands /acmds
Thanks
Re: Help -
UltraScripter - 28.12.2014
pawn Код:
new Adminlvl[MAX_PLAYERS];
pawn Код:
if(Adminlvl[playerid] =< level)
{
//Code
}
Re: Help -
sas10 - 28.12.2014
Quote:
Originally Posted by UltraScripter
pawn Код:
new Adminlvl[MAX_PLAYERS];
pawn Код:
if(Adminlvl[playerid] =< level) { //Code }
|
sorry im bad in english but i have admin system i made it
i want know when admin write /acmds
show to him cmd can use it
with rank if he is rank 5 or 7 or 1 cuz there much commands diffrent in all rank
Re: Help -
UltraScripter - 28.12.2014
if(Adminlvl[playerid] == 1 && Adminlvl[playerid] =< 7)
{
//Code
}
Re: Help -
Facerafter - 28.12.2014
Код:
if(Adminlvl[playerid] == 1)
{
SendClientMessage(playerid, 1, "Admin 1: All yours cmds for admin rank 1");
}
if(Adminlvl[playerid] == 2)
// etc...
Re: Help -
sas10 - 28.12.2014
Problem
Quote:
D:\as\gamemodes\textdra.pwn(4915) : error 028: invalid subscript (not an array or too many subscripts): "pRank"
D:\as\gamemodes\textdra.pwn(4915) : warning 215: expression has no effect
D:\as\gamemodes\textdra.pwn(4915) : error 001: expected token: ";", but found "]"
D:\as\gamemodes\textdra.pwn(4915) : error 029: invalid expression, assumed zero
D:\as\gamemodes\textdra.pwn(4915) : fatal error 107: too many error messages on one line
|
Quote:
CMD:acmds(playerid, params[])
{
if(pRank[playerid] == 1)
{
SendClientMessage(playerid, 1, "Admin 1: All yours cmds for admin rank 1");
}
if(pRank[playerid] == 2)
{
SendClientMessage(playerid, 1, "Admin 2: Kick 2");
}
if(pRank[playerid] == 3)
{
SendClientMessage(playerid, 1, "Admin 3: Freeze 3");
}
if(pRank[playerid] == 4)
{
SendClientMessage(playerid, 1, "Admin 4: /Ban");
}
return 1;
}
|
i want make like this but have error
Re: Help -
Facerafter - 28.12.2014
Show us line 4915
Re: Help -
sas10 - 28.12.2014
fixed by me