28.08.2009, 22:39
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; }