19.03.2011, 06:55
Quote:
ok, i found i do /ahelp but i do /rcon login (password) and then /ahelp and "you are not admin" then i try /makeadmin ID LVL and it say you are no the owner!
|
Or just replace /makeadmin with this:
Code:
if(strcmp(cmd, "/makeadmin", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_SAY, "USAGE: /makeadmin [ID] [level]"); return 1; } new para1; new level; para1 = ReturnUser(tmp); tmp = strtok(cmdtext, idx); level = strval(tmp); if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] == 2) { if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); PlayerInfo[para1][pAdmin] = level; format(string, sizeof(string), " You have been promoted to a level %d admin by %s", level, sendername); SendClientMessage(para1, COLOR_SAY, string); format(string, sizeof(string), " You have promoted %s to a level %d admin.", giveplayer,level); SendClientMessage(playerid, COLOR_SAY, string); } } } else { SendClientMessage(playerid, COLOR_SAY, "You are not owner!"); } } return 1; }