у меня команда что бы сделать лидером кого либо делает первого лидера ранг 6(максимальный0 а когда назначаю второго лидера этой же фракции то он 1 ранг ,кто скажет как изменить? вот команда if(strcmp(cmd, "/makeleader", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /makeleader [playerid/PartOfName] [Number(1-10)]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 16 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " Не допустимый ид фракции,выберай от 0 до 15!"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if(PlayerInfo[para1][pMember] > 0 || PlayerInfo[para1][pFMember] < 255)
{
SendClientMessage(playerid, COLOR_GREY, " That player is in a Faction / Family !");
return 1;
}
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), " You have been promoted to Leader to your requested Faction by Admin %s", sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " You have given %s control to run Faction Number %d.", giveplayer,level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
if(level == 0) { PlayerInfo[para1][pChar] = 0; }
else if(level == 1) { PlayerInfo[para1][pChar] = 288; } //Police Force
else if(level == 2) { PlayerInfo[para1][pChar] = 166; } //FBI/ATF
else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //National Guard
else if(level == 4) { PlayerInfo[para1][pChar] = 228; } //Fire/Ambulance
else if(level == 5) { PlayerInfo[para1][pChar] = 113; } //La Cosa Nostra
else if(level == 6) { PlayerInfo[para1][pChar] = 120; } //Yakuza
else if(level == 7) { PlayerInfo[para1][pChar] = 147; } //Mayor
else if(level == 8) { PlayerInfo[para1][pChar] = 294; } //Hitmans
else if(level == 9) { PlayerInfo[para1][pChar] = 187; } //News Reporters
else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi Cab Company
else if(level == 11) { PlayerInfo[para1][pChar] = 171; } //Driving/Flying School
else if(level == 12) { PlayerInfo[para1][pChar] = 46; }
else if(level == 13) { PlayerInfo[para1][pChar] = 110; }
else if(level == 14) { PlayerInfo[para1][pChar] = 248; }
else if(level == 15) { PlayerInfo[para1][pChar] = 270; }
else if(level == 16) { PlayerInfo[para1][pChar] = 162; }
gTeam[para1] = 16;
PlayerInfo[para1][pTeam] = 16;
SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}