When i do /giverank it says you are not a faction leader and i have assigned myself the faction leadership of LSPD but still it says that your are not a faction/group/org leader ....
CODE: CMD:giverank(playerid, params[]) { new playerb, rank, string[128]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(!PlayerInfo[playerid][pFacLeader]) return SendClientMessage(playerid, COLOR_GREY, "You are not a faction leader."); if(sscanf(params, "ui", playerb, rank)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /giverank [playerid][rank]"); if(playerid == playerb) return SendClientMessage(playerid, COLOR_GREY, "You can't change your rank."); if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player ID."); if(PlayerInfo[playerb][pFac] != PlayerInfo[playerid][pFac]) return SendClientMessage(playerid, COLOR_GREY, "Player is not in your faction."); if(rank < 0 || rank > return SendClientMessage(playerid, COLOR_GREY, "Ranks are between 0 and 8."); if(PlayerInfo[playerb][pFacRank] == rank) return SendClientMessage(playerid, COLOR_GREY, "Player already has that rank."); if(PlayerInfo[playerb][pFacRank] < rank) { PlayerInfo[playerb][pFacRank] = rank; format(string, sizeof(string), "You have {33AA33}promoted {33CCFF}%s to {33AA33}%s (%d){33CCFF}.", GetPlayerNameEx(playerb), RPFRN(playerb), rank); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "%s has {33AA33}promoted {33CCFF}you to {33AA33}%s (%d){33CCFF}.", GetPlayerNameEx(playerid), RPFRN(playerb), rank); SendClientMessage(playerb, COLOR_LIGHTBLUE, string); } else if(PlayerInfo[playerb][pFacRank] > rank) { PlayerInfo[playerb][pFacRank] = rank; format(string, sizeof(string), "You have {FF9900}demoted {33CCFF}%s to {FF9900}%s (%d){33CCFF}.", GetPlayerNameEx(playerb), RPFRN(playerb), rank); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "%s has {FF9900}demoted {33CCFF}you to {FF9900}%s (%d){33CCFF}.", GetPlayerNameEx(playerid), RPFRN(playerb), rank); SendClientMessage(playerb, COLOR_LIGHTBLUE, string); } return 1; } Please Help me |
CMD:giverank(playerid, params[]) { new playerb, rank, string[128]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(PlayerInfo[playerid][pFacLeader]) return SendClientMessage(playerid, COLOR_GREY, "You are not a faction leader."); if(sscanf(params, "ui", playerb, rank)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /giverank [playerid][rank]"); if(playerid == playerb) return SendClientMessage(playerid, COLOR_GREY, "You can't change your rank."); if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player ID."); if(PlayerInfo[playerb][pFac] != PlayerInfo[playerid][pFac]) return SendClientMessage(playerid, COLOR_GREY, "Player is not in your faction."); if(rank < 0 || rank > return SendClientMessage(playerid, COLOR_GREY, "Ranks are between 0 and 8."); if(PlayerInfo[playerb][pFacRank] == rank) return SendClientMessage(playerid, COLOR_GREY, "Player already has that rank."); if(PlayerInfo[playerb][pFacRank] < rank) { PlayerInfo[playerb][pFacRank] = rank; format(string, sizeof(string), "You have {33AA33}promoted {33CCFF}%s to {33AA33}%s (%d){33CCFF}.", GetPlayerNameEx(playerb), RPFRN(playerb), rank); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "%s has {33AA33}promoted {33CCFF}you to {33AA33}%s (%d){33CCFF}.", GetPlayerNameEx(playerid), RPFRN(playerb), rank); SendClientMessage(playerb, COLOR_LIGHTBLUE, string); } else if(PlayerInfo[playerb][pFacRank] > rank) { PlayerInfo[playerb][pFacRank] = rank; format(string, sizeof(string), "You have {FF9900}demoted {33CCFF}%s to {FF9900}%s (%d){33CCFF}.", GetPlayerNameEx(playerb), RPFRN(playerb), rank); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "%s has {FF9900}demoted {33CCFF}you to {FF9900}%s (%d){33CCFF}.", GetPlayerNameEx(playerid), RPFRN(playerb), rank); SendClientMessage(playerb, COLOR_LIGHTBLUE, string); } return 1; }
Код:
CMD:giverank(playerid, params[]) { new playerb, rank, string[128]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(PlayerInfo[playerid][pFacLeader]) return SendClientMessage(playerid, COLOR_GREY, "You are not a faction leader."); if(sscanf(params, "ui", playerb, rank)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /giverank [playerid][rank]"); if(playerid == playerb) return SendClientMessage(playerid, COLOR_GREY, "You can't change your rank."); if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player ID."); if(PlayerInfo[playerb][pFac] != PlayerInfo[playerid][pFac]) return SendClientMessage(playerid, COLOR_GREY, "Player is not in your faction."); if(rank < 0 || rank > return SendClientMessage(playerid, COLOR_GREY, "Ranks are between 0 and 8."); if(PlayerInfo[playerb][pFacRank] == rank) return SendClientMessage(playerid, COLOR_GREY, "Player already has that rank."); if(PlayerInfo[playerb][pFacRank] < rank) { PlayerInfo[playerb][pFacRank] = rank; format(string, sizeof(string), "You have {33AA33}promoted {33CCFF}%s to {33AA33}%s (%d){33CCFF}.", GetPlayerNameEx(playerb), RPFRN(playerb), rank); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "%s has {33AA33}promoted {33CCFF}you to {33AA33}%s (%d){33CCFF}.", GetPlayerNameEx(playerid), RPFRN(playerb), rank); SendClientMessage(playerb, COLOR_LIGHTBLUE, string); } else if(PlayerInfo[playerb][pFacRank] > rank) { PlayerInfo[playerb][pFacRank] = rank; format(string, sizeof(string), "You have {FF9900}demoted {33CCFF}%s to {FF9900}%s (%d){33CCFF}.", GetPlayerNameEx(playerb), RPFRN(playerb), rank); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "%s has {FF9900}demoted {33CCFF}you to {FF9900}%s (%d){33CCFF}.", GetPlayerNameEx(playerid), RPFRN(playerb), rank); SendClientMessage(playerb, COLOR_LIGHTBLUE, string); } return 1; } |
CMD: giverank (playerid, params [])
{
новый игрокb, ранг, строка [128];
if (! IsPlayerLoggedIn (playerid)) возвращает SendClientMessage (playerid, COLOR_GREY, «вам нужно сначала войти в систему, прежде чем использовать любую команду»);
if (PlayerInfo [playerid] [pFacLeader]==0) возвращает SendClientMessage (playerid, COLOR_GREY, «Вы не лидер фракции»);
if (sscanf (params, "ui", playerb, rank)) return SendClientMessage (playerid, COLOR_WHITE, "ИСПОЛЬЗОВАНИЕ: / giverank [playerid] [rank]");
if (playerid == playerb) return SendClientMessage (playerid, COLOR_GREY, «Вы не можете изменить свой ранг»);
if (! IsPlayerLoggedIn (playerb)) возвращает SendClientMessage (playerid, COLOR_GREY, «Недопустимый идентификатор игрока»);
if (PlayerInfo [playerb] [pFac]! = PlayerInfo [playerid] [pFac]) возвращает SendClientMessage (playerid, COLOR_GREY, «Игрок не входит в вашу фракцию»);
if (rank <0 || rank> return SendClientMessage (playerid, COLOR_GREY, «Ранги находятся между 0 и 8.»);
if (PlayerInfo [playerb] [pFacRank] == rank) return SendClientMessage (playerid, COLOR_GREY, «Player уже имеет этот ранг»);
if (PlayerInfo [playerb] [pFacRank] <rank)
{
PlayerInfo [playerb] [pFacRank] = rank;
format (string, sizeof (string), "У вас {33AA33} повышена {33CCFF}% s до {33AA33}% s (% d) {33CCFF}.", GetPlayerNameEx (playerb), RPFRN (playerb), rank);
SendClientMessage (playerid, COLOR_LIGHTBLUE, строка);
format (string, sizeof (string) ",% s имеет {33AA33}, способствовало {33CCFF} вам {33AA33}% s (% d) {33CCFF}.", GetPlayerNameEx (playerid), RPFRN (playerb), rank);
SendClientMessage (playerb, COLOR_LIGHTBLUE, строка);
}
else if (PlayerInfo [playerb] [pFacRank]> rank)
{
PlayerInfo [playerb] [pFacRank] = rank;
format (string, sizeof (string), «У вас есть {FF9900} с пониженным рейтингом {33CCFF}% s до {FF9900}% s (% d) {33CCFF}.", GetPlayerNameEx (playerb), RPFRN (playerb), rank);
SendClientMessage (playerid, COLOR_LIGHTBLUE, строка);
format (string, sizeof (string) ",% s имеет {FF9900} с пониженным рейтингом {33CCFF} до {FF9900}% s (% d) {33CCFF}.", GetPlayerNameEx (playerid), RPFRN (playerb), rank);
SendClientMessage (playerb, COLOR_LIGHTBLUE, строка);
}
return 1;
}
PHP код:
|