/giverank command bug
#1

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
Reply
#2

Quote:
Originally Posted by FaDe420
Посмотреть сообщение
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;
}
Reply
#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
#4

Well Actually i am editing some scripts but their is always some warning/errors in the script and when i spent a day or 2 on that script then the script shows its bugs
by the way thanks for your help
Reply
#5

PHP код:
CMDgiverank (playeridparams [])
{
новый игрокbрангстрока [128];
if (! 
IsPlayerLoggedIn (playerid)) возвращает SendClientMessage (playeridCOLOR_GREY«вам нужно сначала войти в системупрежде чем использовать любую команду»);
if (
PlayerInfo [playerid] [pFacLeader]==0возвращает SendClientMessage (playeridCOLOR_GREY«Вы не лидер фракции»);
if (
sscanf (params"ui"playerbrank)) return SendClientMessage (playeridCOLOR_WHITE"ИСПОЛЬЗОВАНИЕ: / giverank [playerid] [rank]");
if (
playerid == playerb) return SendClientMessage (playeridCOLOR_GREY«Вы не можете изменить свой ранг»);
if (! 
IsPlayerLoggedIn (playerb)) возвращает SendClientMessage (playeridCOLOR_GREY«Недопустимый идентификатор игрока»);
if (
PlayerInfo [playerb] [pFac]! = PlayerInfo [playerid] [pFac]) возвращает SendClientMessage (playeridCOLOR_GREY«Игрок не входит в вашу фракцию»);
if (
rank <|| rank> return SendClientMessage (playeridCOLOR_GREY«Ранги находятся между 0 и 8.»);
if (
PlayerInfo [playerb] [pFacRank] == rank) return SendClientMessage (playeridCOLOR_GREY«Player уже имеет этот ранг»);
if (
PlayerInfo [playerb] [pFacRank] <rank)
{
PlayerInfo [playerb] [pFacRank] = rank;
format (stringsizeof (string), "У вас {33AA33} повышена {33CCFF}% s до {33AA33}% s (% d) {33CCFF}."GetPlayerNameEx (playerb), RPFRN (playerb), rank);
SendClientMessage (playeridCOLOR_LIGHTBLUEстрока);
format (stringsizeof (string) ",% s имеет {33AA33}, способствовало {33CCFF} вам {33AA33}% s (% d) {33CCFF}."GetPlayerNameEx (playerid), RPFRN (playerb), rank);
SendClientMessage (playerbCOLOR_LIGHTBLUEстрока);
}
else if (
PlayerInfo [playerb] [pFacRank]> rank)
{
PlayerInfo [playerb] [pFacRank] = rank;
format (stringsizeof (string), «У вас есть {FF9900с пониженным рейтингом {33CCFF}% s до {FF9900}% (% d) {33CCFF}.", GetPlayerNameEx (playerb), RPFRN (playerb), rank);
SendClientMessage (playerid, COLOR_LIGHTBLUE, строка);
format (string, sizeof (string) "
,% s имеет {FF9900с пониженным рейтингом {33CCFFдо {FF9900}% (% d) {33CCFF}.", GetPlayerNameEx (playerid), RPFRN (playerb), rank);
SendClientMessage (playerb, COLOR_LIGHTBLUE, строка);
}
return 1;

USE
Reply
#6

Quote:
Originally Posted by EvgeniyHostel1992
Посмотреть сообщение
PHP код:
CMDgiverank (playeridparams [])
{
новый игрокbрангстрока [128];
if (! 
IsPlayerLoggedIn (playerid)) возвращает SendClientMessage (playeridCOLOR_GREY«вам нужно сначала войти в системупрежде чем использовать любую команду»);
if (
PlayerInfo [playerid] [pFacLeader]==0возвращает SendClientMessage (playeridCOLOR_GREY«Вы не лидер фракции»);
if (
sscanf (params"ui"playerbrank)) return SendClientMessage (playeridCOLOR_WHITE"ИСПОЛЬЗОВАНИЕ: / giverank [playerid] [rank]");
if (
playerid == playerb) return SendClientMessage (playeridCOLOR_GREY«Вы не можете изменить свой ранг»);
if (! 
IsPlayerLoggedIn (playerb)) возвращает SendClientMessage (playeridCOLOR_GREY«Недопустимый идентификатор игрока»);
if (
PlayerInfo [playerb] [pFac]! = PlayerInfo [playerid] [pFac]) возвращает SendClientMessage (playeridCOLOR_GREY«Игрок не входит в вашу фракцию»);
if (
rank <|| rank> return SendClientMessage (playeridCOLOR_GREY«Ранги находятся между 0 и 8.»);
if (
PlayerInfo [playerb] [pFacRank] == rank) return SendClientMessage (playeridCOLOR_GREY«Player уже имеет этот ранг»);
if (
PlayerInfo [playerb] [pFacRank] <rank)
{
PlayerInfo [playerb] [pFacRank] = rank;
format (stringsizeof (string), "У вас {33AA33} повышена {33CCFF}% s до {33AA33}% s (% d) {33CCFF}."GetPlayerNameEx (playerb), RPFRN (playerb), rank);
SendClientMessage (playeridCOLOR_LIGHTBLUEстрока);
format (stringsizeof (string) ",% s имеет {33AA33}, способствовало {33CCFF} вам {33AA33}% s (% d) {33CCFF}."GetPlayerNameEx (playerid), RPFRN (playerb), rank);
SendClientMessage (playerbCOLOR_LIGHTBLUEстрока);
}
else if (
PlayerInfo [playerb] [pFacRank]> rank)
{
PlayerInfo [playerb] [pFacRank] = rank;
format (stringsizeof (string), «У вас есть {FF9900с пониженным рейтингом {33CCFF}% s до {FF9900}% (% d) {33CCFF}.", GetPlayerNameEx (playerb), RPFRN (playerb), rank);
SendClientMessage (playerid, COLOR_LIGHTBLUE, строка);
format (string, sizeof (string) "
,% s имеет {FF9900с пониженным рейтингом {33CCFFдо {FF9900}% (% d) {33CCFF}.", GetPlayerNameEx (playerid), RPFRN (playerb), rank);
SendClientMessage (playerb, COLOR_LIGHTBLUE, строка);
}
return 1;

USE
How is he suppose to understand what's going on here?
Reply
#7

if (PlayerInfo [playerid] [pFacLeader]==0) return SendClientMessage (playerid, COLOR_GREY, «not leader»);

==0
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)