Advertisement
Guest User

Untitled

a guest
Jan 5th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. CMD:afactions(playerid, params[])
  2. {
  3. new string[300];
  4.  
  5. SendClientMessage(playerid, COLOR_TBLUE, "Les factions du serveur:");
  6. SendClientMessage(playerid, COLOR_TBLUE, "______________________________");
  7.  
  8. for(new i = 0; i < sizeof(FactionInfo); i++)
  9. {
  10. if(FactionInfo[i][f_ID] > 0 && FactionInfo[i][f_Type] == 1)
  11. {
  12. format(string, sizeof(string), "[GANG] id %d - %s", FactionInfo[i][f_ID], FactionInfo[i][f_Name]);
  13. SendClientMessage(playerid, -1, string);
  14. }
  15. }
  16.  
  17. for(new i = 0; i < sizeof(FactionInfo); i++)
  18. {
  19. if(FactionInfo[i][f_ID] > 0 && FactionInfo[i][f_Type] == 2)
  20. {
  21. format(string, sizeof(string), "[MAFIA] id %d - %s", FactionInfo[i][f_ID], FactionInfo[i][f_Name]);
  22. SendClientMessage(playerid, -1, string);
  23. }
  24. }
  25.  
  26. return 1;
  27. }
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40. CMD:factions(playerid, params[])
  41. {
  42. new str[182], longstr[556];
  43.  
  44. for(new i = 0; i < sizeof(FactionInfo); i++)
  45. {
  46. if(FactionInfo[i][f_ID] > 0)
  47. {
  48.  
  49. format(str, sizeof(str), "{ADC3E7}%d \t\t\t %s \t\t\t [%d connecté(s) sur %d]\n", i, FactionInfo[i][f_Name], ReturnOnlineMembers(i), ReturnTotalMembers(i));
  50. strcat(longstr, str);
  51.  
  52. }
  53. }
  54.  
  55. ShowPlayerDialog(playerid, DIALOG_DEFAULT, DIALOG_STYLE_LIST, "Liste des factions:", longstr, "<<", "");
  56. return 1;
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement