/giverank command bug
#3

Quote:
Originally Posted by ForCop
Посмотреть сообщение
Код:
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;
}
seriously? I saw some of your posts, you're just editing their codes without letting them know what was the error or wrong, if they still got same type of issue, I don't think that you'll be at him to correct that.
so please explain them what was their mistakes.
Reply


Messages In This Thread
/giverank command bug - by FaDe420 - 07.04.2018, 19:09
Re: /giverank command bug - by ForCop - 07.04.2018, 19:28
Re: /giverank command bug - by Mugala - 07.04.2018, 22:21
Re: /giverank command bug - by FaDe420 - 08.04.2018, 09:15
Re: /giverank command bug - by EvgeniyHostel1992 - 08.04.2018, 10:28
Re: /giverank command bug - by Melktert - 08.04.2018, 10:51
Re: /giverank command bug - by EvgeniyHostel1992 - 08.04.2018, 10:58

Forum Jump:


Users browsing this thread: 1 Guest(s)