Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Sistema Skin em Dialog [ID]
- Created By > @Riichard e GustavoG3D[OwnPlaay]
- IniciodoSAMP.BLOGSPOT.COM
- */
- #include <a_samp>
- #include a_samp
- #define DIALOG_SKIN 700 // ID JA USADA? SO MODIFICAR!
- // Cores Que Vou Usar
- #define Azul 0x1E90FFAA
- #define Vermelho 0xFF0000AA
- #define Sucesso 0x00FF00AA
- // Variavel
- new string[128];
- new badSkins[22];
- // == Inicio == //
- #if defined FILTERSCRIPT
- #endif
- // Public -
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(!strcmp(cmdtext, "/pmskin", true))
- {
- new Nick[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nick, MAX_PLAYER_NAME);
- SendClientMessageToAll(Azul, string);
- ShowPlayerDialog(playerid,DIALOG_SKIN,DIALOG_STYLE_INPUT,"Troca de Skin!:","Digite a ID Da Skin Abaixo:","Selecionar","Cancelar");
- }
- return 0;
- }
- // Public -
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_SKIN)
- {
- if(!response)
- return SendClientMessage(playerid, Vermelho, ": Troca de Skin Cancelada.");
- if(!strval(inputtext))
- return SendClientMessage(playerid, Vermelho, ": Troca de Skin Cancelada.");
- if(strval(inputtext) < 0 || strval(inputtext) > 299)
- return SendClientMessage(playerid, Vermelho, "- Skin Inválida!");
- for(new i = 0; i < sizeof(badSkins); i++)
- if(strval(inputtext) == badSkins[i])
- return SendClientMessage(playerid, Vermelho, "- Skin Inválida!");
- format(string, sizeof(string), "> Skin Alterada! ID : %d", strval(inputtext));
- SendClientMessage(playerid, Sucesso, string);
- SetPlayerSkin(playerid,strval(inputtext));
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement