Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- VISITE NOSSO SITE: http://www.sampknd.com/
- SAMP KND MELHOR BLOG DE SAM DO BRASIL
- Sistema Skin em Dialog [ID]
- Created By > @Riichard [OwnPlaay]
- [SDS] Drift > 69.162.102.12:7773
- */
- #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
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" > Sistema Skin em Dialog [ID] <");
- print("--------------------------------------\n");
- return 1;
- }
- #endif
- // Public -
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(!strcmp(cmdtext, "/skin", true))
- {
- new Nick[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nick, MAX_PLAYER_NAME);
- format(string, sizeof(string), "Player : %s(ID:%d) Está alterando sua Skin! {00BFFF}/Skin", Nick,playerid);
- SendClientMessageToAll(Azul, string);
- ShowPlayerDialog(playerid,DIALOG_SKIN,DIALOG_STYLE_INPUT,"Seleção Skin:","Digite a ID Da Skin Abaixo:","Selecionar","Fechar");
- }
- 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