Advertisement
Guest User

FS /pmskin By GustavoG3D e RiCard

a guest
Dec 23rd, 2013
794
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. /*
  2.  
  3. Sistema Skin em Dialog [ID]
  4. Created By > @Riichard e GustavoG3D[OwnPlaay]
  5. IniciodoSAMP.BLOGSPOT.COM
  6.  
  7. */
  8. #include <a_samp>
  9. #include a_samp
  10. #define DIALOG_SKIN 700 // ID JA USADA? SO MODIFICAR!
  11.  
  12. // Cores Que Vou Usar
  13. #define Azul 0x1E90FFAA
  14. #define Vermelho 0xFF0000AA
  15. #define Sucesso 0x00FF00AA
  16. // Variavel
  17. new string[128];
  18. new badSkins[22];
  19.  
  20. // == Inicio == //
  21. #if defined FILTERSCRIPT
  22.  
  23. #endif
  24.  
  25. // Public -
  26. public OnPlayerCommandText(playerid, cmdtext[])
  27. {
  28. if(!strcmp(cmdtext, "/pmskin", true))
  29. {
  30. new Nick[MAX_PLAYER_NAME];
  31. GetPlayerName(playerid, Nick, MAX_PLAYER_NAME);
  32. SendClientMessageToAll(Azul, string);
  33. ShowPlayerDialog(playerid,DIALOG_SKIN,DIALOG_STYLE_INPUT,"Troca de Skin!:","Digite a ID Da Skin Abaixo:","Selecionar","Cancelar");
  34. }
  35. return 0;
  36. }
  37.  
  38. // Public -
  39. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  40. {
  41. if(dialogid == DIALOG_SKIN)
  42. {
  43. if(!response)
  44.  
  45. return SendClientMessage(playerid, Vermelho, ": Troca de Skin Cancelada.");
  46.  
  47. if(!strval(inputtext))
  48.  
  49. return SendClientMessage(playerid, Vermelho, ": Troca de Skin Cancelada.");
  50.  
  51. if(strval(inputtext) < 0 || strval(inputtext) > 299)
  52.  
  53. return SendClientMessage(playerid, Vermelho, "- Skin Inválida!");
  54.  
  55. for(new i = 0; i < sizeof(badSkins); i++)
  56.  
  57. if(strval(inputtext) == badSkins[i])
  58.  
  59. return SendClientMessage(playerid, Vermelho, "- Skin Inválida!");
  60.  
  61. format(string, sizeof(string), "> Skin Alterada! ID : %d", strval(inputtext));
  62.  
  63. SendClientMessage(playerid, Sucesso, string);
  64.  
  65. SetPlayerSkin(playerid,strval(inputtext));
  66. }
  67. return 0;
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement