/setadmin not work
#6

I edit from
Quote:

CMDetadmin(playerid, params[], help)
{
#pragma unused help
if(PlayerInfo[playerid][pAdmin] < 7 && !IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_RED, "You need to be RCON Admin to use this!");
new
string[128],pplayerid,level;
if(sscanf(params, "ui", pplayerid,level)) return SCM(playerid, COLOR_RED, "Usage: /setadmin [Player ID/Player Name] [Admin Level]");
if(level > 7 || level <= -1) return SCM(playerid,COLOR_RED,"Max level is 7" "and" "Lower is 0");
if(pplayerid == IPI) return SCM(playerid, COLOR_RED, "Wrong playerid!");
format(string,sizeof(string),""COL_RED"Admin "COL_WHITE"%s "COL_RED"has given you admin level"COL_WHITE" %d",GetName(playerid),level);
SCM(pplayerid,-1,string);
format(string,sizeof(string),""COL_RED"Player "COL_WHITE"%s "COL_RED"now have admin level"COL_WHITE" %d",GetName(pplayerid),level);
SCM(playerid,-1,string);
PlayerInfo[pplayerid][pAdmin] = level;
return 1;

to
Quote:

CMDetadmin(playerid, params[], help)
{
#pragma unused help
if(PlayerInfo[playerid][pAdmin] < 7 && !IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_RED, "You need to be RCON Admin to use this!");
new
string[128],pplayerid,level;
if(sscanf(params, "ui", pplayerid,level)) return SCM(playerid, COLOR_RED, "Usage: /setadmin [Player ID/Player Name] [Admin Level]");
if(level > 7 || level <= -1) return SCM(playerid,COLOR_RED,"Max level is 7" "and" "Lower is 0");
if(pplayerid == IPI) return SCM(playerid, COLOR_RED, "Wrong playerid!");
format(string,sizeof(string),""COL_RED"Admin "COL_WHITE"%s "COL_RED"has given you admin level"COL_WHITE" %d",GetName(playerid),level);
SCM(pplayerid,-1,string);
format(string,sizeof(string),""COL_RED"Player "COL_WHITE"%s "COL_RED"now have admin level"COL_WHITE" %d",GetName(pplayerid),level);
SCM(playerid,-1,string);
PlayerInfo[pplayerid][pAdmin] = level;
SaveStats(targetid);
return 1;

thanks for helping guys
Reply


Messages In This Thread
/setadmin not work - by GeorgeLimit - 31.12.2018, 16:27
Re: /setadmin not work - by Kraeror - 31.12.2018, 16:32
Re: /setadmin not work - by GeorgeLimit - 31.12.2018, 16:40
Re: /setadmin not work - by GeorgeLimit - 31.12.2018, 17:30
Re: /setadmin not work - by solstice_ - 01.01.2019, 01:53
Re: /setadmin not work - by GeorgeLimit - 01.01.2019, 02:10

Forum Jump:


Users browsing this thread: 3 Guest(s)