[Ajuda] Dialog Votaзгo/Evento/Casamento
#1

Resolvido !
Reply
#2

Nгo entendi muito Tenta fazer de novo tipo assim :

PHP код:
CMD:convidar(playeridparams[])//Base
{
    if(!
IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1"Nгo estб connectado !");
    if(
sscanf(params"d"id)) return SendClientMessage(playeridVERMELHO"Use: /convidar [ID]");
    
ShowPlayerDialog(id2000DIALOG_STYLE_MSGBOX"Convite para Evento"string"Sim""Nгo");
}


if(
dialogid == 2000)
{
    if(
response == 0)
    {
        
//Funзгo Nгo
        
return 0;
    }
    if(
response == 1)
    {
        
//Coloque pra executar quando aperta Sim
        
return 1;
    }

Reply
#3

Resolvido !
Reply
#4

Quote:
Originally Posted by Coringa_Vilao
Посмотреть сообщение
pera pera pera entao para nao confundir niguem !
vamos comeзar pelo o da votaзгo ok ?

entao vamos la !

Creio que todos esses codigo nгo irar se usado !
entao vamos trabalhar acho que so com esse:
pawn Код:
if(!strcmp(cmdtext, "/votacao", true,8))
    {
        if (PlayerInfo[playerid][pAdmin] >= 1300)
        {
            if(!votacao[iniciada])
            {
                if(!strlen(cmdtext[9]))
                return SendClientMessage(playerid,0xFFFFFFAA, "Use: /votacao [pergunta]");
                SendClientMessageToAll(LARANJA,"====================================");
                format(string, sizeof string, "==>%s Votaзгo: %s ?",PlayerName(playerid), cmdtext[9]);
                SendClientMessageToAll(VERDECLARO, string);
                SendClientMessageToAll(LARANJA,"    ");
                SendClientMessageToAll(LARANJA," > Para votar digite:");
                SendClientMessageToAll(VERDEMEDIO, "> /sim - Se vocк concorda digite.");
                SendClientMessageToAll(VERDEMEDIO, "> /nao - Se vocк discorda digite.");
                SendClientMessageToAll(LARANJA,"====================================");
                votacao[iniciada] = true;
                votacao[sim] = 0;
                votacao[nao] = 0;
                GameTextForAll("~w~Nova ~r~votacao~w~ foi~b~ iniciada!",6000,3);
                for(new i; i <MAX_PLAYERS; i++)
                {
                    votou[i] = false;
                }
            }
            else
            {
                SendClientMessage(playerid,BRANCO,"Ja existe uma votaзгo em andamento!");
            }
        }
        else
        {
            SendClientMessage(playerid,BRANCO,"Vocк nгo tem permissгo para usar este comando!");
        }
        return 1;
    }
entao eu quero adc um efeito Dialog a esse codigo ai me pergunta qual efeito ? quando um ADM fazer votaзгo ai aparece em Dialog para todos do servidor a pergunta dentro da caixa e os 2 botхes "SIM" & "NAO" eu ja fiz um exemplo:
pawn Код:
#define DIALOG_VOTACAO 1145

----

            if(dialogid == DIALOG_VOTACAO)
    {
        if(response == 0)
        {
        OnPlayerCommandText(playerid,"/sim");
        SendClientMessage(playerid, 0x1E90FFFF, "Seu voto foi computado com sucesso!"); // aqui vocк poe oq vai acontecer no comando /aceitar
            return 1;
        }
        if(response == 1)
        {
            OnPlayerCommandText(playerid,"/nao");
        SendClientMessage(playerid, 0x1E90FFFF, "Seu voto foi computado com sucesso!"); // aqui vocк poe oq vai acontecer no comando /aceitar
            return 1;
        }
Agora deu pra entender ?
+ ou - ! @Edit


PHP код:
#define DIALOG_VOTACAO 1145
if(!strcmp(cmdtext"/votacao"true,8))
{
    if(
PlayerInfo[playerid][pAdmin] >= 1300)
    {
        
SendClientMessage(playerid,BRANCO,"Vocк nгo tem permissгo para usar este comando!");
        return 
1;
    }
    if(!
votacao[iniciada])
    {
        
SendClientMessage(playerid, -1"Ja existe Votaзгo !");[])
        return 
1;
    }
    if(!
strlen(cmdtext[9])) return SendClientMessage(playerid,0xFFFFFFAA"Use: /votacao [pergunta]");
    
votacao[iniciada] = true;
    
votacao[sim] = 0;
    
votacao[nao] = 0;
       
format(stringsizeof(string), "==>%s Votaзгo: %s ?",PlayerName(playerid), cmdtext[9]);
                        
ShowPlayerDialog(para1DIALOG_VOTACAODIALOG_STYLE_MSGBOX"Votaзгo Criada"string"Sim","Nao");
     
GameTextForAll("~w~Nova ~r~votacao~w~ foi~b~ iniciada!",6000,3);
    for(new 
i<MAX_PLAYERSi++)
    {
        
votou[i] = false;
    }
}
        
if(
dialogid == DIALOG_VOTACAO)
{
    if(
response == 0)
     {
          
OnPlayerCommandText(playerid,"/sim");
        
SendClientMessage(playerid0x1E90FFFF"Seu voto foi computado com sucesso!"); // aqui vocк poe oq vai acontecer no comando /aceitar
        
return 1;
    }
    if(
response == 1)
    {
        
OnPlayerCommandText(playerid,"/nao");
        
SendClientMessage(playerid0x1E90FFFF"Seu voto foi computado com sucesso!"); // aqui vocк poe oq vai acontecer no comando /aceitar
        
return 1;
    }

Reply
#5

Resolvido !
Reply
#6

Resolvido !
Reply
#7

Resolvido !
Reply
#8

Resolvido !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)