25.12.2011, 23:06
Quote:
if(strcmp(cmd,"/faction",true)==0)
{ if(IsPlayerConnected(playerid)) { new teamnumber; if (PlayerInfo[playerid][pLeader] != 0) teamnumber = PlayerInfo[playerid][pLeader]; else if (PlayerInfo[playerid][pMember] != 0) teamnumber = PlayerInfo[playerid][pMember]; else { SendClientMessage(playerid, COLOR_GRAD1, "you are not in any faction!"); return 1; } SendClientMessage(playerid, 0x808000AA, "**Membre online**"); for(new i = 0; i < MAX_PLAYERS; i++) { if (IsPlayerConnected(i)) { GetPlayerName(i, sendername, sizeof(sendername)); format(string, sizeof(string), ""); if (PlayerInfo[i][pLeader] == teamnumber) format(string, sizeof(string), "%s (LEADER)",sendername); else if (PlayerInfo[i][pMember] == teamnumber) format(string, sizeof(string), "%s, Rang: %d.",sendername, PlayerInfo[i][pRank]); if (strlen(string) > 1) SendClientMessage(playerid, 0xF5DEB3AA, string); } } } return 1; } try to make some copy |