CMD:claninfo(playerid, params[]) { new c = 0, str[228]; new clanid=Info[playerid][cMiembro]; if (Info[playerid][LoggedIn] == 0) return SendClientMessage(playerid, -1, "Usted debe estar conectado!"); if(!clanid) return SendClientMessage(playerid,-1,"Usted no pertenece a un clan."); for(new i=0;i<MAX_PLAYERS;i++){ { if (IsPlayerConnected(i)) { if(!clanid) { c++; if (c==1) { format(str, sizeof(str), "Nombre: %s\n\ Top Clan: %d\n\ Score: %d\n\n\ {0489B1}miembros online:{FFFFFF}\n\ _________________________________\n\ {FFFFFF}%s(%d)\n",Clanes[clanid][aNombre],NombreOOC(i),Clanes[clanid][topclan],Clanes[clanid][score], i); } if (c >=2) { format(str, sizeof(str), "\n%s(%d)", str, GetName(i), i); } } } } ShowPlayerDialog(playerid, -10, DIALOG_STYLE_MSGBOX, "Clan Info:", str, "OK", ""); return 1; } |
CMD:claninfo(playerid, params[]) { if(Info[playerid][LoggedIn] == 0) return SendClientMessage(playerid,-1,"Usted debe estar registrado."); if(!Info[playerid][cMiembro]) return SendClientMessage(playerid,-1,"Usted no pertenece a un clan."); new str[228],clanid = Info[playerid][cMiembro]; format(str,sizeof(str),"Nombre: %s\n\ Top Clan: %d\n\ Score: %d\n\n\ {0489B1}miembros online:{FFFFFF}\n\ _________________________________\n",Clanes[clanid][aNombre],Clanes[clanid][topclan],Clanes[clanid][score]); new temp[MAX_PLAYER_NAME*2],c = 0; for(new i = 0, j = GetPlayerPoolSize(); i < j; i++) { if(IsPlayerConnected(i) && Info[i][cMiembro] == clanid) { c++; format(temp,sizeof(temp),"%d.- %s(%d)\n",c,GetName(i),i); strcat(string,temp); } } ShowPlayerDialog(playerid,DIALOG_ID,DIALOG_STYLE_MSGBOX,"Clan Info:",str,"OK",""); return 1; }
#define CLANINFO (1) CMD:claninfo(playerid, params[]) { new c = 0, str[228]; new clanid = Info[playerid][cMiembro]; if(Info[playerid][LoggedIn] == 0) return SendClientMessage(playerid, -1, "Usted debe estar conectado."); if(!clanid) return SendClientMessage(playerid, -1, "Usted no pertenece a un clan."); for(new i =0; i <MAX_PLAYERS; i++) { if(!clanid) { c++; if(c==1) format(str, sizeof(str), "Nombre: %s\n\ Top Clan: %d\n\ Score: %d\n\n\ {0489B1}miembros online:{FFFFFF}\n\ _________________________________\n\ {FFFFFF}%s(%d)\n", Clanes[clanid][aNombre], NombreOOC(i), Clanes[clanid][topclan], Clanes[clanid][score], i); } if(c >= 2) { format(str, sizeof(str), "\n%s(%d)", str, GetName(i), i); } } ShowPlayerDialog(playerid, CLANINFO, DIALOG_STYLE_MSGBOX, "Clan Info:", str, "OK", ""); return 1; } |