Show cmds only for admins
#1

Hey samp community!

A need someone to script me this if possible.

I want to create a command for admins commands, /acmds.

Would work like this,

If ADMIN LV1 - lv1 admin commands - blablabla

If ADMIN LV2 - lv1 admin commands - blablabla
........................-lv2 admin commands - blablabla

If ADMIN LV3 - lv1 admin commands....
.......................- lv2 admin commands...
.........................-lv 3 admin commands

Etc.

Who tries to help me gets + 1 reputation and thanks: )
Reply
#2

What is your admin variable?

And basically works like this:

if(youradminvariable[playerid] >= 1)
{
SendClientMessage(playerid,-1,"Only lvl 1 or above can see this..");
}
if(youradminvarilable[playerid] >= 2)
{
SendClientMessage(playerid,-1,"Only lvl 2 or above can see this..");
}

Hope that helps.
Reply
#3

pawn Код:
cmd(acmds,playerid, params[])
{
    if(GetAdminLevel(playerid) == 1) [Change this to your admin var]
        SendClientMessage(playerid, -1, "blablaba");
    if(GetAdminLevel(playerid) == 2)[Change this to your admin var]
    {
        SendClientMessage(playerid, -1, "blablaba");
    }
    if(GetAdminLevel(playerid) == 3)[Change this to your admin var]
    {
        SendClientMessage(playerid, -1, "blablaba");
    }
    if(GetAdminLevel(playerid) == 4)[Change this to your admin var]
    {
        SendClientMessage(playerid, -1, "blablaba");
    }
    if(GetAdminLevel(playerid) == 5)[Change this to your admin var]
    {
        SendClientMessage(playerid, -1, "blablaba");
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)