Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define DIALOG_CERCA 1
- new Text:TextDrawPol5[MAX_PLAYERS];
- //onplayerconncet
- TextDrawPol5[playerid] = TextDrawCreate(317.000000, 262.000000, "Cerca");
- TextDrawAlignment(TextDrawPol5[playerid], 2);
- TextDrawBackgroundColor(TextDrawPol5[playerid], 255);
- TextDrawFont(TextDrawPol5[playerid], 1);
- TextDrawLetterSize(TextDrawPol5[playerid], 0.500000, 2.000000);
- TextDrawColor(TextDrawPol5[playerid], -1);
- TextDrawSetOutline(TextDrawPol5[playerid], 0);
- TextDrawSetProportional(TextDrawPol5[playerid], 1);
- TextDrawSetShadow(TextDrawPol5[playerid], 1);
- TextDrawUseBox(TextDrawPol5[playerid], 1);
- TextDrawBoxColor(TextDrawPol5[playerid], 255);
- TextDrawTextSize(TextDrawPol5[playerid], 15.000000, 48.000000);
- TextDrawSetSelectable(TextDrawPol5[playerid], 1);
- TextDrawBoxColor(TextDrawPol5[playerid], 0x00000070 );
- TextDrawBackgroundColor(TextDrawPol5[playerid], 0x00000070);
- //sotto clickedid==SpritePolDx
- if(Skin[playerid] == 70) Skin[playerid] = 71;//Security Guard
- if(Skin[playerid] == 73) Skin[playerid] = 74;//Null
- //Sotto clickedid==SpritePolSx
- if(Skin[playerid] == 72) Skin[playerid] = 71;
- if(Skin[playerid] == 75) Skin[playerid] = 74;
- //SOTTO onplayerclicktextdraw
- if(clickedid == TextDrawPol5[playerid]){//CERCA
- TextDrawHideForPlayer(playerid, TextDrawPol0[playerid]);
- TextDrawHideForPlayer(playerid, TextDrawPol1[playerid]);
- TextDrawHideForPlayer(playerid, TextDrawPol2[playerid]);
- TextDrawHideForPlayer(playerid, TextDrawPol3[playerid]);
- TextDrawHideForPlayer(playerid, TextDrawPol4[playerid]);
- TextDrawHideForPlayer(playerid, TextDrawPol5[playerid]);
- TextDrawHideForPlayer(playerid, SpritePolDx[playerid]);
- TextDrawHideForPlayer(playerid, SpritePolSx[playerid]);
- ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", "Inserisci l'ID della Skin che cerchi.", "Cerca", "Indietro");
- return 1;}
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_CERCA){
- if(!response){
- TextDrawShowForPlayer(playerid, TextDrawPol0[playerid]);
- TextDrawShowForPlayer(playerid, TextDrawPol1[playerid]);
- TextDrawShowForPlayer(playerid, TextDrawPol2[playerid]);
- TextDrawShowForPlayer(playerid, TextDrawPol3[playerid]);
- TextDrawShowForPlayer(playerid, TextDrawPol4[playerid]);
- TextDrawShowForPlayer(playerid, TextDrawPol5[playerid]);
- TextDrawShowForPlayer(playerid, SpritePolDx[playerid]);
- TextDrawShowForPlayer(playerid, SpritePolSx[playerid]);}
- if(response){
- new string2[500];
- //=========//
- new string_inputtext0[500];//Nessun ID inserito
- new string_inputtext1[500];//ID invalido
- //====0====//
- strcat(string_inputtext0, "Devi inserire un ID!\n");
- strcat(string_inputtext0, "Inserisci l'ID della Skin che cerchi.");
- //====1====//
- strcat(string_inputtext1, "Devi inserire un ID valido!\n");
- strcat(string_inputtext1, "Inserisci l'ID della Skin che cerchi.");
- //=========//
- if(sscanf(inputtext, "d", Skin[playerid])) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext0, "Cerca", "Indietro");
- if(Skin[playerid] > 311 || Skin[playerid] < 0) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1 , "Cerca", "Indietro");
- if(Skin[playerid] == 0) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 71) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 74) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 217) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 265) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 266) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 267) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 274) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 276) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 277) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 278) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 279) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 280) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 281) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 282) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 283) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 284) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 285) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 286) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 287) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 288) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 300) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 301) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 302) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 306) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 307) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 308) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 309) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 310) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- else if(Skin[playerid] == 311) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
- Skin[playerid] = Skin[playerid];
- format(string2, sizeof(string2), "Seleziona la tua Skin: %d", Skin[playerid]);
- TextDrawSetString(TextDrawPol2[playerid], string2); //"Seleziona la tua Skin: ID skin"//
- TextDrawSetPreviewModel(TextDrawPol0[playerid], Skin[playerid]);//Preview Sx
- TextDrawSetPreviewModel(TextDrawPol1[playerid], Skin[playerid]);//Preview Dx
- TextDrawShowForPlayer(playerid, TextDrawPol0[playerid]);
- TextDrawShowForPlayer(playerid, TextDrawPol1[playerid]);
- TextDrawShowForPlayer(playerid, TextDrawPol2[playerid]);
- TextDrawShowForPlayer(playerid, TextDrawPol3[playerid]);
- TextDrawShowForPlayer(playerid, TextDrawPol4[playerid]);
- TextDrawShowForPlayer(playerid, TextDrawPol5[playerid]);
- TextDrawShowForPlayer(playerid, SpritePolDx[playerid]);
- TextDrawShowForPlayer(playerid, SpritePolSx[playerid]);}
- return 1;}
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement