dRaGoN_gReY
Участник
- 75
- 8
Слушай, сделаешь с выдачей адм. / если назначил писало админам | [A]:Admin назначил nick администратором(3 уровень) | и т.д.?PHP:else if(strcmp(cmd, "/skick", true) == 0) { if (PlayerInfo[playerid][pAdmin] >= 5) { tmp = strtok(cmdtext, idx); new giveplayerid; if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "::: Введите: /skick [id]"); giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { new string[70]; new name[MAX_PLAYER_NAME],name1[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); GetPlayerName(giveplayerid, name1, sizeof(name1)); format(string,sizeof(string),"[A] %s кикнул %s",name,name1); SendAdminMessage(COLOR_WHITE,string); Kick(giveplayerid); } else SendClientMessage(playerid, COLOR_GREY, "Такого игрока нет"); } return true; }
Выдача адм.
PHP:
if(strcmp("/arang", cmdtext, true, 4) == 0){
if(IsPlayerConnected(playerid)){
tmp = strtok(cmdtext, idx);
if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 6) return SendClientMessage(playerid, COLOR_WHITE, "{999999}Èñïîëüçóéòå: /arang [id èãðîêà] [îò 1 äî 6]");
new giveplayer[MAX_PLAYER_NAME],sendername[MAX_PLAYER_NAME],string[256];
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 6 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "Óðîâåíü àäìèíèñòðàòîðà ìîæåò áûòü îò 1 äî 6 | 0 - ñíÿòü ñ ïîñòà àäìèíèñòðàòîðà"); return true; }
if(PlayerInfo[playerid][pAdmin] >= 6 || IsPlayerAdmin(playerid)){
if(IsPlayerConnected(para1)){
if(para1 != INVALID_PLAYER_ID){
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pAdmin] = level;
printf("{3399FF}%s {FFFF00}ïðîäâèíóë {3399FF}%s {FFFF00}íà {3399FF}%d {FFFF00}óðîâåíü àäìèíèñòðàòîðà.", sendername, giveplayer, level);
format(string, sizeof(string), "{3399FF}%s {FFFF00}íàçíà÷èë âàñ àäìèíèñòðàòîðîì {3399FF}%d {FFFF00}óðîâíÿ", sendername, level);
SendClientMessage(para1, COLOR_YELLOW, string);
format(string, sizeof(string), "{FFFF00}Âû íàçíà÷èëè {3399FF}%s {FFFF00}àäìèíèñòðàòîðîì {3399FF}%d {FFFF00}óðîâíÿ.", giveplayer,level);
SendClientMessage(playerid, COLOR_YELLOW, string);}}}else{SendClientMessage(playerid, COLOR_GRAD1, "Âû íå óïîëíîìî÷åíû èñïîëüçîâàòü ýòó êîìàíäó!");}}return true;}