Need me help for admin command [+REP] -
dundolina - 28.07.2012
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;
}
Re: Need me help for admin command [+REP] -
Alexis1999 - 28.07.2012
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.
Re: Need me help for admin command [+REP] -
dundolina - 28.07.2012
Command don't work..
Re: Need me help for admin command [+REP] -
Alexis1999 - 28.07.2012
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 )
Re: Need me help for admin command [+REP] -
dundolina - 28.07.2012
I delete the other command,i add the things in filterscript and add your command.When i wrote /editorcmd nothing happend..
Re: Need me help for admin command [+REP] -
dundolina - 28.07.2012
Help?
Re: Need me help for admin command [+REP] -
dundolina - 28.07.2012
Come on need me admin code for command.. :X
Re: Need me help for admin command [+REP] -
Devilxz97 - 28.07.2012
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 ..
Re: Need me help for admin command [+REP] -
Alexis1999 - 28.07.2012
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
Re: Need me help for admin command [+REP] -
dundolina - 28.07.2012
Don't work,help?