Guest User

Untitled

a guest
Jan 8th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. forward ChoixPersonnage(playerid);
  2. public ChoixPersonnage(playerid)
  3. {
  4. new rows,
  5. fields,
  6. string[256],
  7. count,
  8. name[64];
  9.  
  10.  
  11. cache_get_data(rows, fields);
  12.  
  13.  
  14. new id_char = cache_get_field_content_int(0, "id");
  15.  
  16.  
  17. if(rows)
  18. {
  19.  
  20. for(new i; i < rows; i++)
  21. {
  22.  
  23. cache_get_field_content(i, "username", name);
  24. format(string, sizeof(string),"Personnage: {FFFFFF}%s", name);
  25. SendClientMessage(playerid, -1, string);
  26.  
  27. format(string, sizeof(string), "%s\n", name);
  28. ShowPlayerDialog(playerid, DIALOG_CHOIX_PERSO, DIALOG_STYLE_LIST, "Choix de votre personnage", string, "Valider", "Quitter");
  29.  
  30. }
  31. }
  32.  
  33. else
  34. {
  35. SendClientMessage(playerid, COLOR_ADMIN, "Erreur: Votre personnage n'est pas activé !");
  36. }
  37.  
  38.  
  39. return 1;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment