[Help] /adsetlevel command
#5

Im a new scripter idk what u talking about D: sry BUT if u want more information here it is the adsetlevel command. What should i put?

dcmd_adsetlevel(playerid,params[])
{
new string[128];
new ID;
new cmdreason;
if(sscanf(params,"ui",ID,cmdreason))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /adsetlevel (Player Name/ID) (Level)");
return 1;
}
if(!IsPlayerConnected(ID))
{
format(string,sizeof(string),"[ERROR] The player ID (%d) is not connected to the server. You cannot set their administrator level.",ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(PLAYERLIST_authed[ID] != 1)
{
format(string,sizeof(string),"[ERROR] %s(%d) is not logged into to the server. You must wait till they login before you set their administrator level.",PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(AdminLevel[ID] == cmdreason)
{
format(string,sizeof(string),"[ERROR] %s(%d) is already at the Administrator level: %d",PlayerName(ID),ID,cmdreason);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(playerid == ID)
{
SendClientMessage(playerid,COLOR_ERROR,"[ERROR] You cannot set your own Administrator level. You are already the highest level.");
return 1;
}
new string1[128];
format(string1,sizeof(string1),"[ADMIN LEVEL CHANGE] Owner %s(%d) has given %s(%d) administrator level %d.",PlayerName(playerid),playerid,PlayerName(ID), ID,cmdreason);
SendClientMessageToAll(COLOR_ADMIN,string1);
dUserSet("Nickname").("Adminlevel ","%d");

SendClientMessage(ID,COLOR_ADMIN,"Your admin level has been changed by the Server Owner. To see your new commands type /adcmds.");
AdminLevel[ID] =cmdreason;

format(string,sizeof(string),"[ADMIN LEVEL CHANGE] Owner %s(%d) has given %s(%d) administrator level %d.",PlayerName(playerid),playerid,PlayerName(ID), ID,cmdreason);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
dUserSet("Nickname").("Adminlevel ","%d");
return 1;
}
Reply


Messages In This Thread
[Help] /adsetlevel command - by GunZ75 - 16.09.2014, 13:38
Re: [Help] /adsetlevel command - by Eth - 16.09.2014, 13:41
Re: [Help] /adsetlevel command - by GunZ75 - 16.09.2014, 13:50
Re: [Help] /adsetlevel command - by WalterWhite - 16.09.2014, 13:55
Re: [Help] /adsetlevel command - by GunZ75 - 16.09.2014, 13:59
Re: [Help] /adsetlevel command - by GunZ75 - 16.09.2014, 14:13
Re: [Help] /adsetlevel command - by WalterWhite - 16.09.2014, 14:13
Re: [Help] /adsetlevel command - by GunZ75 - 16.09.2014, 14:17
Re: [Help] /adsetlevel command - by WalterWhite - 16.09.2014, 14:21
Re: [Help] /adsetlevel command - by GunZ75 - 16.09.2014, 14:27

Forum Jump:


Users browsing this thread: 1 Guest(s)