SHARE
TWEET

Skin Dialog. [PEDIDO]

a guest Apr 25th, 2012 180 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. VISITE NOSSO SITE: http://www.sampknd.com/
  3. SAMP KND MELHOR BLOG DE SAM DO BRASIL
  4.  
  5. Sistema Skin em Dialog [ID]
  6. Created By > @Riichard [OwnPlaay]
  7. [SDS] Drift > 69.162.102.12:7773
  8.  
  9. */
  10. #include <a_samp>
  11. #define DIALOG_SKIN 700 // ID JA USADA? SO MODIFICAR!
  12.  
  13. // Cores Que Vou Usar
  14. #define Azul 0x1E90FFAA
  15. #define Vermelho 0xFF0000AA
  16. #define Sucesso 0x00FF00AA
  17. // Variavel
  18. new string[128];
  19. new badSkins[22];
  20.  
  21. // == Inicio == //
  22. #if defined FILTERSCRIPT
  23.  
  24. public OnFilterScriptInit()
  25. {
  26.         print("\n--------------------------------------");
  27.         print("  >    Sistema Skin em Dialog [ID]  <");
  28.         print("--------------------------------------\n");
  29.         return 1;
  30. }
  31.  
  32. #endif
  33.  
  34. // Public -
  35. public OnPlayerCommandText(playerid, cmdtext[])
  36. {
  37. if(!strcmp(cmdtext, "/skin", true))
  38. {
  39. new Nick[MAX_PLAYER_NAME];
  40. GetPlayerName(playerid, Nick, MAX_PLAYER_NAME);
  41. format(string, sizeof(string), "Player : %s(ID:%d)  Está alterando sua Skin! {00BFFF}/Skin", Nick,playerid);
  42. SendClientMessageToAll(Azul, string);
  43. ShowPlayerDialog(playerid,DIALOG_SKIN,DIALOG_STYLE_INPUT,"Seleção Skin:","Digite a ID Da Skin Abaixo:","Selecionar","Fechar");
  44. }
  45. return 0;
  46. }
  47.  
  48. // Public -
  49. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  50. {
  51. if(dialogid == DIALOG_SKIN)
  52. {
  53. if(!response)
  54.  
  55. return SendClientMessage(playerid, Vermelho, ": Troca de Skin Cancelada.");
  56.  
  57. if(!strval(inputtext))
  58.  
  59. return SendClientMessage(playerid, Vermelho, ": Troca de Skin Cancelada.");
  60.  
  61. if(strval(inputtext) < 0 || strval(inputtext) > 299)
  62.  
  63. return SendClientMessage(playerid, Vermelho, "- Skin Inválida!");
  64.  
  65. for(new i = 0; i < sizeof(badSkins); i++)
  66.  
  67. if(strval(inputtext) == badSkins[i])
  68.  
  69. return SendClientMessage(playerid, Vermelho, "- Skin Inválida!");
  70.  
  71. format(string, sizeof(string), "> Skin Alterada! ID : %d", strval(inputtext));
  72.  
  73. SendClientMessage(playerid, Sucesso, string);
  74.  
  75. SetPlayerSkin(playerid,strval(inputtext));
  76. }
  77. return 0;
  78. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top