[AJUDA]Dialog
#1

Galera, consegui por uns animes no server aqui, mas agora queria fazer para por eles em dialog, na verdade n quero q faзam pra mim, eu qro й aprender como por os cmds em dialog. Se alguem puder me ajudar com isso, vlw

pawn Код:
if(strcmp("/animes", cmd, true) == 0)
    {
    SendClientMessage(playerid, COR_VERMELHA, "/render (/handsup) /bebado /apontar /droga /mascara");
    SendClientMessage(playerid, COR_VERMELHA, "/roubar /cruzarb /deitar /abaixar /vomitar /comer /rap /passarmao");
    SendClientMessage(playerid, COR_VERMELHA, "/cobrar /tremer /fumar1 /fumar2 /sentar /conversar /lutar /observar");
    return 1;
    }
Reply
#2

https://sampwiki.blast.hk/wiki/ShowPlayerDialog
https://sampwiki.blast.hk/wiki/OnDialogResponse
Reply
#3

Quote:
Originally Posted by Felipe_Wesker
Посмотреть сообщение
Galera, consegui por uns animes no server aqui, mas agora queria fazer para por eles em dialog, na verdade n quero q faзam pra mim, eu qro й aprender como por os cmds em dialog. Se alguem puder me ajudar com isso, vlw

pawn Код:
if(strcmp("/animes", cmd, true) == 0)
    {
    SendClientMessage(playerid, COR_VERMELHA, "/render (/handsup) /bebado /apontar /droga /mascara");
    SendClientMessage(playerid, COR_VERMELHA, "/roubar /cruzarb /deitar /abaixar /vomitar /comer /rap /passarmao");
    SendClientMessage(playerid, COR_VERMELHA, "/cobrar /tremer /fumar1 /fumar2 /sentar /conversar /lutar /observar");
    return 1;
    }
https://sampforum.blast.hk/showthread.php?tid=287721 ---> ve isso pode ser q ajude
Reply
#4

PHP код:
if(strcmp("/animes", cmd, true) == 0)
    {
        new 
strying[190];
        
strcat(strying, "/render (/handsup) /bebado /apontar /droga /mascara\n");
        
strcat(strying, "/roubar /cruzarb /deitar /abaixar /vomitar /comer /rap /passarmao\n");
        
strcat(strying, "/cobrar /tremer /fumar1 /fumar2 /sentar /conversar /lutar /observar");
        
ShowPlayerDialog(playerid, 9942, DIALOG_STYLE_MSGBOX, "Animes", strying, "Ok", "Ok");
        return 
1;
    } 
Visualiza o Codigo e veja como funciona, Nгo precisa usar strcat sempre...
Reply
#5

Acho que ele quis dizer pra colocar os "animes" em um dialog que quando seleciona tal anime ele й executado, nгo?
Reply
#6

Quote:
Originally Posted by Ghost_
Посмотреть сообщение
Acho que ele quis dizer pra colocar os "animes" em um dialog que quando seleciona tal anime ele й executado, nгo?
Nгo sei rs, Entendi por aquilo para mostrar no Dialog.
Reply
#7

PHP код:
//==-=-=-=--==-=-=-=-==-=-=-=-=-=-=--=-==---=-=-==--==--==-=-=-=-=--==-=-=-=--=-==-=-=-=-=-=-// 
/*=--==-=-=-=--=-=-=-==--=-==--=-==--=FS Criador por Todo_Poderoso!!!=--==-=-=--==-=-=-==-=-=// 
-=-=-==--==--==--==--==--=-=-=-==--==-nao RETIRE OSCREDITOS-=-=-=-=-=-=-=--==-=--=-=-=-==--==*/ 
  
#define FILTERSCRIPT 
#include <a_samp> 
#if defined FILTERSCRIPT 
#define TP 100                                    //troque se seu gm tiver pode causar bug troque por outro numero de dialog caso seu gm nao tiver dialog defino 100 nao precisa 
//contem 14 Animes 
//==-=-=-=--==-=-=-=-==-=-=-=-=-=-=--=-==---=-=-==--==--==-=-=-=-=--==-=-=-=--=-==-=-=-=-=-=-// 
/*=--==-=-=-=--=-=-=-==--=-==--=-==--=FS Criador por Todo_Poderoso!!!=--==-=-=--==-=-=-==-=-=// 
-=-=-==--==--==--==--==--=-=-=-==--==-nao RETIRE OSCREDITOS-=-=-=-=-=-=-=--==-=--=-=-=-==--==*/ 
public OnFilterScriptInit() 
{ 
    print(
"-=-==- Sistema De animes em dialog -=-==- "); 
    print(
"-=-==- iniciado -=-==-|"); 
    print(
"-=-==- By Todo_Poderoso -=-==-"); 
    return 
1; 
} 
  
  
public 
OnPlayerCommandText(playerid, cmdtext[]) 
{ 
    if(
strcmp(cmdtext, "/animes", true) == 0) { 
        
ShowPlayerDialog(playerid, TP, DIALOG_STYLE_LIST, "Sistema De Animes", "Handsup\nBebado\nAssaltar\nVomitar\nAcenar\nMirar Arma Na Centura\nEstatua\nAmarrar Sapato Devagar\nAmarrar Sapato Rapido\nFicku\nUrinar\nDeitar\nFumar Encostado\nsentar\nEngatinhar\nParar Anime\nCreditos", "Selecionar", "Cancelar"); 
        return 
1; 
    } 
    return 
false; 
} 
  
  
//==-=-=-=--==-=-=-=-==-=-=-=-=-=-=--=-==---=-=-==--==--==-=-=-=-=--==-=-=-=--=-==-=-=-=-=-=-// 
/*=--==-=-=-=--=-=-=-==--=-==--=-==--=FS Criador por Todo_Poderoso!!!=--==-=-=--==-=-=-==-=-=// 
-=-=-==--==--==--==--==--=-=-=-==--==-nao RETIRE OSCREDITOS-=-=-=-=-=-=-=--==-=--=-=-=-==--==*/ 
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) 
{ 
    if(
dialogid == TP) 
    if(
response) { 
        if(
listitem == 0) {                      //handsup 
            
SetPlayerSpecialAction(playerid, 10); 
            return 
1; 
        } 
        if(
listitem == 1) {                      //Ficar embreagado 
            
ApplyAnimation(playerid, "PED", "WALK_DRUNK", 4.0, 1, 1, 1, 1, 0); 
            return 
1; 
        } 
        if(
listitem == 2) {                      // Assal 
            
ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0); 
            return 
1; 
        } 
        if(
listitem == 3) {                      //Vomitar 
            
ApplyAnimation(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 0); 
            return 
1; 
        } 
        if(
listitem == 4) {                      //ACENAR 
            
ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 0); 
            return 
1; 
        } 
        if(
listitem == 5) {                      // mirar arma na centura 
            
ApplyAnimation(playerid,"BAR","Barcustom_get",4.1,0,1,1,1,1); 
            return 
1; 
        } 
        if(
listitem == 6) {                      //estatua 
            
ApplyAnimation(playerid,"BOX","bxshwlki",4.1,0,1,1,1,1); 
            return 
1; 
        } 
        if(
listitem == 7) {                      // amarrar sapato devagar 
            
ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.1,0,1,1,1,1); 
            return 
1; 
        } 
        if(
listitem == 8) {                      // amarrar sapato rapido 
            
ApplyAnimation(playerid,"BOMBER","BOM_Plant_2Idle",4.1,0,1,1,1,1); 
            return 
1; 
        } 
        if(
listitem == 9) {                      // Ficku 
            
ApplyAnimation(playerid, "PED", "fucku", 4.0, 0, 0, 0, 0, 0); 
            return 
1; 
        } 
        if(
listitem == 10) {                      //Pinto piu mijar 
            
ApplyAnimation(playerid, "PAULNMAC", "Piss_in", 4.0, 1, 0, 0, 0, 0); 
            return 
1; 
        } 
        if(
listitem == 11) {                      //deitar 
            
ApplyAnimation(playerid, "CRACK", "Crckidle2", 4.0, 1, 0, 0, 0, 0); 
            return 
1; 
        } 
        if(
listitem == 12) {                      //fumar encostado 
            
ApplyAnimation(playerid, "SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0); 
            return 
1; 
        } 
        if(
listitem == 13) {                      //sentar 
            
ApplyAnimation(playerid, "BEACH", "ParkSit_M_loop", 4.0, 1, 0, 0, 0, 0); 
            return 
1; 
        } 
        if(
listitem == 14) {                      //Engatinhar 
            
ApplyAnimation(playerid,"FINALE","FIN_Land_Car",4.1,1,1,1,1,1,1); 
            return 
1; 
        } 
        if(
listitem == 15) {                      //Parar animes 
            
ClearAnimations(playerid); 
            return 
1; 
        } 
        if(
listitem == 16) {                      //Creditos 
//nao Retire 
            
SendClientMessage(playerid,0x7CFC00AA,"Creditos a Todo_Poderoso "); 
            return 
1; 
        } 
    } 
    return 
1; 
} 
  
  
//==-=-=-=--==-=-=-=-==-=-=-=-=-=-=--=-==---=-=-==--==--==-=-=-=-=--==-=-=-=--=-==-=-=-=-=-=-// 
/*=--==-=-=-=--=-=-=-==--=-==--=-==--=FS Criador por Todo_Poderoso!!!=--==-=-=--==-=-=-==-=-=// 
-=-=-==--==--==--==--==--=-=-=-==--==-nao RETIRE OSCREDITOS-=-=-=-=-=-=-=--==-=--=-=-=-==--==*/ 
#endif 
De uma estuda neste e tente faser o seu
Reply
#8

Descupa o double post
Deu Problema na net.
Reply
#9

Nao Ghost, eu n queria todos os animes em dialog, somente o /animes.. para aprender como fazer, obrigaado a todos! Vou entender como funciona agora
Reply


Forum Jump:


Users browsing this thread: