[Ajuda] Comandos em Dialog
#1

Queria colocar esses 3 comandos em Dialog , aqui as coordenadas de onde pode ser usado o comando .
if (PlayerToPoint(2, playerid,830.6808,-0.2795,1004.1797) || PlayerToPoint(2,playerid,833.5997,3.2969,1004.1797 ))


pawn Код:
if(strcmp(cmd, "/loteria", true) == 0)
    {
        if (PlayerToPoint(2, playerid,830.6808,-0.2795,1004.1797) || PlayerToPoint(2,playerid,833.5997,3.2969,1004.1797))
        {
            if(PlayerInfo[playerid][pLottoNr] > 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Vocк jб tem um bilhete de loteria !");
                return true;
            }
            if(GetPlayerMoney(playerid) < 10)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo tem R$10 para pagar o nъmero de loteria !");
                return true;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE,"USE: /loteria [nъmero]");
                return true;
            }
            new lottonr = strval(tmp);
            if(lottonr < 1 || lottonr > 80)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Nъmero da loteria, de 1 a 80 !");
                return true;
            }
            format(string, sizeof(string), "* Vocк comprou um bilhete de loteria com nъmero: %d.", lottonr);
            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
            GivePlayerMoney(playerid, - 10);
            PlayerInfo[playerid][pLottoNr] = lottonr;
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo estб na Lotйrica !");
         }
         return true;
    }
        if(strcmp(cmd, "/mudarsexo", true) == 0)
    {
        if (PlayerToPoint(2, playerid,830.6808,-0.2795,1004.1797) || PlayerToPoint(2,playerid,833.5997,3.2969,1004.1797))
        {
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new x_sexo[32];
            x_sexo = strtok(cmdtext, idx);
            if(!strlen(x_sexo))
            {
                SendClientMessage(playerid, COLOR_WHITE, "|______________ Cartуrio ______________|");
                SendClientMessage(playerid, COLOR_WHITE, "|Use: /mudarsexo [Numero]");
                SendClientMessage(playerid, COLOR_GREY, "| 1 - Homem");
                SendClientMessage(playerid, COLOR_GREY, "| 2 - Mulher");
                return true;
            }
            if(strcmp(x_sexo,"1",true) == 0)
            {
                format(string, sizeof(string), "* Jogador %s mudou seu sexo para masculino.", PlayerName(playerid));
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                PlayerInfo[playerid][pSex] = 1;
                SendClientMessage(playerid,COLOR_GREEN,"Vocк mudou seu sexo para masculino!");
                return true;
            }
            if(strcmp(x_sexo,"2",true) == 0)
            {
                format(string, sizeof(string), "* Jogador %s mudou seu sexo para feminino.", PlayerName(playerid));
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                PlayerInfo[playerid][pSex] = 2;
                SendClientMessage(playerid,COLOR_GREEN,"Vocк trocou seu sexo para feminino!");
                return true;
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo estб na igreja de LS.");
        }
    }//Separaзгo
    if(strcmp(cmd, "/separacao", true) == 0)
    {
        if (PlayerToPoint(2, playerid,830.6808,-0.2795,1004.1797) || PlayerToPoint(2,playerid,833.5997,3.2969,1004.1797))
        {
            GetPlayerName(playerid, sendername, sizeof(sendername));
            if(IsPlayerConnected(playerid))
            {
                new x_separar[32];
                x_separar = strtok(cmdtext, idx);
                if(!strlen(x_separar))
                {
                    SendClientMessage(playerid, COLOR_WHITE, "|______________ Cartуrio ______________|");
                    SendClientMessage(playerid, COLOR_WHITE, "|Use: /separacao [Numero]");
                    SendClientMessage(playerid, COLOR_GREY, "| 1 - Sim");
                    SendClientMessage(playerid, COLOR_GREY, "| 2 - Nгo");
                    return true;
                }
                if(strcmp(x_separar,"1",true) == 0)
                {
                    if(PlayerInfo[playerid][pMarried] > 0)
                    {
                        format(string, sizeof(string), "* Jogador %s se divorciou!", PlayerName(playerid));
                        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        SendClientMessage(playerid,COLOR_GREY,"Vocк se divorciou!");
                        ClearMarriage(playerid);
                        return true;
                    }
                    SendClientMessage(playerid,COLOR_GREEN,"Vocк nгo й casado(a)!");
                }
                if(strcmp(x_separar,"2",true) == 0)
                {
                    if(PlayerInfo[playerid][pMarried] > 0)
                    {
                        SendClientMessage(playerid,COLOR_GREEN,"Vocк continuou casado(a)!");
                        return true;
                    }
                }
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo estб na igreja de LS!");
        }
    }
Reply


Messages In This Thread
Comandos em Dialog - by Wendell - 08.05.2013, 19:03
Re: Comandos em Dialog - by BielCOP - 08.05.2013, 19:20
Respuesta: Comandos em Dialog - by Wendell - 08.05.2013, 19:28
Re: Comandos em Dialog - by BielCOP - 08.05.2013, 19:38
Respuesta: Comandos em Dialog - by Wendell - 08.05.2013, 20:08
Re: Comandos em Dialog - by BielCOP - 08.05.2013, 20:10
Respuesta: Comandos em Dialog - by Wendell - 08.05.2013, 20:15
Re: Comandos em Dialog - by BielCOP - 08.05.2013, 20:16
Respuesta: Comandos em Dialog - by Wendell - 08.05.2013, 20:26

Forum Jump:


Users browsing this thread: 1 Guest(s)