Just a little help please
#1

If I use that I see me as Leader thats ok, but I see other members as leader too :S , only in this list, what's wrong here ?



Код:
if(strcmp(cmd, "/gdonline", true) == 0)
{
	if(PlayerData[playerid][Gundealer] < 1) return SendClientMessage(playerid, RED, "SERVER MESSAGE: You need to be Official Gundealer.");
 	SendClientMessage(playerid, RED, "People with Gundealer rights:");

  for(new i = 0; i <= MAX_PLAYERS; i++)
  {
  if(IsPlayerConnected(i) == 1 && PlayerData[i][Gundealer] >= 1 && PlayerData[i][Gundealer] < 1338)
  {
  new rank[256];
	if (PlayerData[playerid][Gundealer] == 1) rank = "Member";
	else if (PlayerData[playerid][Gundealer] == 2) rank = "Co Leader";
	else if (PlayerData[playerid][Gundealer] == 3) rank = "Leader";
  GetPlayerName(i, sendername, sizeof(sendername));
  format(string, 256, "%s: %s", rank, sendername);
  SendClientMessage(playerid, ORANGE, string);
  	}
  	}
  return 1;
}
Reply
#2

I don't understand what your asking...
Reply
#3

This script does not work perfectly it's bugged a little bit, if I join the Server and do /gdonline I see everyone as Leader, there is something wrong, it comes form code.
Reply
#4

any one know how to fix ?
Reply
#5

Do you have it so it sets there Gun Dealer level to 0 on register?
Reply
#6

Yeah, only this thing is the problem it shows it wrong, but the ranks are right
Reply
#7

http://pastebin.com/m49d0e001

^^ Fixed it.

Your problem was you where checking the original playerid, not the loop that you made.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)