23.01.2018, 15:13
Код:
CMD:setpro(playerid,params[]) { if(pInfo[playerid][pLogged] == 1) { if(pInfo[playerid][pAdminLevel] >= 8) { new targetid,level,string[256]; if(sscanf(params, "ud", targetid, level)) return SendClientMessage(playerid,-1,""chat" /setpro [playerid] [level]"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online"); if(level < 0 || level > 10) return SendClientMessage(playerid,-1,""chat" Admin levels are ONLY between 1-10"); pInfo[targetid][pAdminLevel] = level; format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s have given admin status of %d to %s",GetAdminName(playerid),PlayerName(playerid),level,PlayerName(targetid)); SendClientMessageToAll(-1,string); printf("%s %s have given admin status of %d to %s",GetAdminName(playerid),PlayerName(playerid),level,PlayerName(targetid)); } else { SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!"); } } else if(pInfo[playerid][pLogged] == 0) { SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" Nice try u fucking fag gay!"); printf("%s has been kicked for trying to use a command without being logged in!", PlayerName(playerid)); Kick(playerid); } return 1; }
Код:
if(pInfo[playerid][pAdminLevel] >= 8)
Код:
if(pInfo[playerid][pAdminLevel] >= 8||IsPlayerAdmin(playerid))
Other than that, you have to edit the userfile, whilst someone is offline, and change the pAdminLevel user ini.