Advertisement
Guest User

Untitled

a guest
Feb 4th, 2016
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. //Comanda in sine
  2. CMD:members(playerid, params[])
  3. {
  4. if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You are not logged in.");
  5. if(PlayerInfo[playerid][pMember] + PlayerInfo[playerid][pLeader] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You are not member of a faction.");
  6. new stringg[256], pName2[MAX_PLAYER_NAME], pRankul, pLastLog[128], fString[64];
  7. mysql_format(handle, stringg, sizeof(stringg), "SELECT * FROM `players` WHERE `Member` = '%d' ORDER BY `Rank` DESC", PlayerInfo[playerid][pMember]);
  8. new Cache: result12 = mysql_query(handle, stringg);
  9. gString[128] = (EOS);
  10.  
  11. for(new i, j = cache_get_row_count(); i!=j; ++i)
  12. {
  13. cache_get_field_content(i,"AName",pName2);
  14. format(Selected[i][Numele],24,pName2);
  15. pRankul=cache_get_field_content_int(i,"Rank");
  16. cache_get_field_content(i,"LastLogin",pLastLog);
  17.  
  18. format(fString,sizeof(fString),"Members of {%s}%s{FFFFFF}(%d members)",FactionColor2[i],FactionName[i],FactionMembers(i));
  19. new conected = GetPlayerID(Selected[i][Numele]);
  20. if(conected = INVALID_PLAYER_ID)
  21. {
  22. format(gString,sizeof(gString),"%s - Rank: %d - {00BC00}online \n",pName2,pRankul);
  23. }
  24. else
  25. {
  26. format(gString , sizeof(gString),"%s - Rank: %d - {FF0000}offline - {FFFFFF}Ultimul Login %s \n",pName2,pRankul,pLastLog);
  27. }
  28. }
  29. cache_delete(result12);
  30. ShowPlayerDialog(playerid,DIALOG_MEMBERS,DIALOG_STYLE_LIST,fString,gString,"Select","Cancel");
  31. return 1;
  32. }
  33. //========//
  34. //FactionColor2
  35. new FactionColor2[11][] = {
  36. "FFFFFF",
  37. "2641FE",
  38. "1E519D",
  39. "B3F856",
  40. "C2A2DA",
  41. "FFFF00",
  42. "A52A2A",
  43. "008000",
  44. "800080",
  45. "FFA500",
  46. "4F4F4F"
  47. };
  48. //FactionName
  49. new FactionName[11][] = {
  50. {"Civilian"},
  51. {"Police Department"},
  52. {"FBI"},
  53. {"Government"},
  54. {"News Reporters"},
  55. {"Taxi Cab Company"},
  56. {"Hitmen Agency"},
  57. {"The Barzini Family"},
  58. {"The Paterno Family"},
  59. {"The Tattaglia Family"},
  60. {"The Corleone Family"}
  61. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement