31.12.2018, 16:27
if I login to rcon and make me /setadmin, this just only sendClientMessage but not write at my playername.ini I use this code
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; } //Aka GiDan Admin FS |