MistarA

Untitled

Sep 5th, 2019
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. CMD:skins(playerid) {
  2. const MAX_SKINS = 299;
  3. new subString[16];
  4. static string[MAX_SKINS * sizeof(subString)];
  5.  
  6. if (string[0] == EOS) {
  7. for (new i; i < MAX_SKINS; i++) {
  8. format(subString, sizeof(subString), "%i\tID: %i\n", i, i);
  9. strcat(string, subString);
  10. }
  11. }
  12.  
  13. return ShowPlayerDialog(playerid, 99999, DIALOG_STYLE_PREVIEW_MODEL, "Select skin", string, "Select", "Cancel");
  14. }
  15. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
  16. if (dialogid == 99999) {
  17. if (response) {
  18. SetPlayerSkin(playerid, listitem);
  19. GameTextForPlayer(playerid, "~g~Skin schimbat!", 3000, 3);
  20. }
  21. }
  22. return 1;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment