Need me help for admin command [+REP]
#1

I want to do this command for admin level 4, but I do not know how. Please someone if you can make me command admin lvl 4.

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp(cmdtext, EDITOR_CMD, true))
	{
	    #if defined ADMIN_ONLY
	    if(!IsPlayerAdmin(playerid)) return 1;
	    #endif
	    ShowPlayerDialog(playerid, DIALOG_MAIN_MENU, DIALOG_STYLE_LIST, "WestSide Object Editor", "Create object\nSearch object models\nDelete object\nEdit object\nSave object\nLoad objects", "Select", "Cancel");
		return 1;
	}
	return 0;
}
Reply
#2

pawn Код:
#include <a_samp>
#include <zcmd>

#define DIALOG_MAIN_MENU 6000

enum pData
{
AdminLevel,
}

new PlayerInfo[MAX_PLAYERS][pData];

CMD:editorcmd(playerid, params[])
{
if( PlayerInfo[playerid][AdminLevel] > 4 )
                           return ShowPlayerDialog(playerid, DIALOG_MAIN_MENU, DIALOG_STYLE_LIST, "WestSide Object Editor", "Create object\nSearch object models\nDelete object\nEdit object\nSave object\nLoad objects", "Select", "Cancel");
return 1;
}
Create a new filterscript and paste ^ code. Please Note that is a small part of the script. To set somebody level 4 admin you must learn using y_ini.
Reply
#3

Command don't work..
Reply
#4

Quote:
Originally Posted by dundolina
Посмотреть сообщение
Command don't work..
It doesn't work because you have to create a command for RCON Admins to set other players as Level 4 Admins. Lol. I told you you must learn y_ini in order to do it if you actually read what I typed or just copied it.

P.S The comand is /editorcmd ( just in case you wrote /editor_cmd )
Reply
#5

I delete the other command,i add the things in filterscript and add your command.When i wrote /editorcmd nothing happend..
Reply
#6

Help?
Reply
#7

Come on need me admin code for command.. :X
Reply
#8

pawn Код:
#include a_samp // by samp dev team
#include zcmd //use zcmd by zeex

enum pInfo
{
    pAdmin //i dont know your variables
}
new PlayerInfo[MAX_PLAYERS][pInfo];

CMD:editorcmd(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 4) //this will allow admin level 4++ to use the commands
    {
        ShowPlayerDialog(playerid, DIALOG_MAIN_MENU, DIALOG_STYLE_LIST, "WestSide Object Editor", "Create object\nSearch object models\nDelete object\nEdit object\nSave object\nLoad objects", "Select", "Cancel");
    }
    else
    {
        SendClientMessage(playerid, -1, "You need to be Admin level 4 to use this Commands!"); //the warning
    }
    return 1;
}
try this ..
Reply
#9

Quote:
Originally Posted by Devilxz97
Посмотреть сообщение
pawn Код:
#include a_samp // by samp dev team
#include zcmd //use zcmd by zeex

enum pInfo
{
    pAdmin //i dont know your variables
}
new PlayerInfo[MAX_PLAYERS][pInfo];

CMD:editorcmd(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 4) //this will allow admin level 4++ to use the commands
    {
        ShowPlayerDialog(playerid, DIALOG_MAIN_MENU, DIALOG_STYLE_LIST, "WestSide Object Editor", "Create object\nSearch object models\nDelete object\nEdit object\nSave object\nLoad objects", "Select", "Cancel");
    }
    else
    {
        SendClientMessage(playerid, -1, "You need to be Admin level 4 to use this Commands!"); //the warning
    }
    return 1;
}
try this ..
You just pasted exactly the same thing I did. Lol
Reply
#10

Don't work,help?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)