[Ajuda] /veiculodacasa em zcmd
#1

alguйm pode me ajudar eu uso dialog pra fazer essa funзгo OnPlayerCommandText(playerid, "/veiculodacasa Alpha"); mas depois que fiz o cmd em zcmd nгo esta funcionando o OnPlayerCommandText(playerid, "/veiculodacasa Alpha");
Reply
#2

Quote:
Originally Posted by Carlos001
Посмотреть сообщение
voce tem o Comando? Se tiver Me Passe Que Coloco Ele Em zcmd
tipo se eu digitar /veiculodacasa nomedoveiculo ele funciona o problema й se eu clico no dialog ele nгo envia OnPlayerCommandText(playerid, "/veiculodacasa Admiral");
Reply
#3

PHP код:
    if(dialogid == VeiculosCasas)
    {
    if(
response)
    {
    if(
listitem == 0)
    {
    new 
Lista1 []= "Admiral - Preзo $30.000\nAlpha - Preзo $30.000\nBanshee - Preзo $60.000\nBandito - Preзo $35.000\nBF-400 - Preзo $25.000\nBF-Injection - Preзo $5.000\nBike - Preзo $500\nBlade - Preзo $40.000\nBlista Compact - Preзo $15.000\nBloodring Banger - Preзo $45.000\nBmx - Preзo $1.000\nBobcat - Preзo $32.000\n<- Voltar";
    
ShowPlayerDialog(playeridVeiculosLista1DIALOG_STYLE_LIST,"~> Veнculos Casas Lista 1",Lista1,"Comprar","Cancelar");
    }
    if(
listitem == 1)
    {
    new 
Lista2 []= "Baggage - $Preзo 9.000\nBoxville - Preзo $26.000\nBravura - Preзo $33.000\nBroadway - Preзo $44.000\nBuccaneer - Preзo $40.000\nBuffalo - Preзo $75.000\nBullet - Preзo $80.000\nBurrito - Preзo $48.000\nCadrona - Preзo $37.000\nCaddy - Preзo $13.000\nCamper - Preзo $28.000\nCheetah - Preзo $95.000\n<- Voltar";
    
ShowPlayerDialog(playeridVeiculosLista2DIALOG_STYLE_LIST,"~> Veнculos Casas Lista 2",Lista2,"Comprar","Cancelar");
    }
    if(
listitem == 2)
    {
    new 
Lista3 []= "Clover - Preзo $43.000\nClub - Preзo $47.000\nComet - Preзo $18.000\nElegant - Preзo $49.000\nElegy - Preзo $78.000\nEmperor - Preзo $55.000\nEsperanto - Preзo $22.000\nEuros - Preзo $64.000\nFaggio - Preзo $3.000\nFCR-900 - $32.000\nFeltzer - Preзo $23.000\nFlash - Preзo $62.000\n<- Voltar";
    
ShowPlayerDialog(playeridVeiculosLista3DIALOG_STYLE_LIST,"~> Veнculos Casas Lista 3",Lista3,"Comprar","Cancelar");
    }
    if(
listitem == 3)
    {
    new 
Lista4 []= "Fortune - Preзo $34.000\nForklift - Preзo $6.000\nFreeway - Preзo $22.000\nGlendale - Preзo $26.000\nGreenwood - Preзo $20.000\nHermes - Preзo $41.000\nHotdog - Preзo $28.000\nHotknife - Preзo $66.000\nHotring - Preзo $90.000\nHuntley - Preзo $65.000\nHustler - Preзo $59.000\nInfernus - Preзo $90.000\n<- Voltar";
    
ShowPlayerDialog(playeridVeiculosLista4DIALOG_STYLE_LIST,"~> Veнculos Casas Lista 4",Lista4,"Comprar","Cancelar");
    }
    if(
listitem == 4)
    {
    new 
Lista5 []= "Intruder - Preзo $29.000\nJester - Preзo $72.000\nJourney - Preзo $85.000\nKart - Preзo $14.000\nLandstalker - Preзo $65.000\nMajestic - Preзo $17.000\nManana - Preзo $22.000\nMerit - Preзo $39.000\nMesa - Preзo $56.000\nMoonbeam - Preзo $51.000\nMower - Preзo $15.000\n<- Voltar";
    
ShowPlayerDialog(playeridVeiculosLista5DIALOG_STYLE_LIST,"~> Veнculos Casas Lista 5",Lista5,"Comprar","Cancelar");
    }
    if(
listitem == 5)
    {
    new 
Lista6 []= "Mule - Preзo $42.000\nNebula - Preзo $33.000\nNRG-500 - Preзo $55.000\nOceanic - Preзo $24.000\nPCJ-600 - Preзo $38.000\nPerenniel - Preзo $19.000\nPhoenix - Preзo $83.000\nPicador - Preзo $21.000\nPony - Preзo $39.000\nPremier - Preзo $31.000\nPrevion - Preзo $36.000\nPrimo - Preзo $34.000\n<- Voltar";
    
ShowPlayerDialog(playeridVeiculosLista6DIALOG_STYLE_LIST,"~> Veнculos Casas Lista 6",Lista6,"Comprar","Cancelar");
    }
    if(
listitem == 6)
    {
    new 
Lista7 []= "Quad - Preзo $10.000\nRancher - Preзo $84.000\nRegina - Preзo $27.000\nRemington - Preзo $57.000\nRomero - Preзo $53.000\nRumpo - Preзo $38.000\nSabre - Preзo $22.000\nSadler - Preзo $14.000\nSanchez - Preзo $6.000\nSandking - Preзo $80.000\nSavanna - Preзo $39.000\nSlamvam - Preзo $25.000\n<- Voltar";
    
ShowPlayerDialog(playeridVeiculosLista7DIALOG_STYLE_LIST,"~> Veнculos Casas Lista 7",Lista7,"Comprar","Cancelar");
    }
    if(
listitem == 7)
    {
    new 
Lista8 []= "Solair - Preзo $40.000\nStafford - Preзo $45.000\nStallion - Preзo $22.000\nStratum - Preзo $56.000\nStretch - Preзo $20.000\nSultan - Preзo 64.000\nSunrise - Preзo $51.000\nSuper GT - Preзo $80.000\nSweeper - Preзo $7.000\nTahoma - Preзo $48.000\nTornado - Preзo $33.000\nTractor - Preзo $5.000\nTug - Preзo $3.000\n<- Voltar";
    
ShowPlayerDialog(playeridVeiculosLista8DIALOG_STYLE_LIST,"~> Veнculos Casas Lista 8",Lista8,"Comprar","Cancelar");
    }
    if(
listitem == 8)
    {
    new 
Lista9 []= "Turismo - Preзo $95.000\nUranus - Preзo $57.000\nVincent - Preзo $42.000\nVirgo - Preзo $22.000\nVoodoo - Preзo $23.000\nVortex - Preзo $10.000\nWalton - Preзo $10.000\nWashington - Preзo $29.000\nWayfarer - Preзo $11.000\nWillard - Preзo $37.000\nWindsor - Preзo $19.000\nYosemite - Preзo $77.000\nZR-350 - Preзo $85.000\n<- Voltar";
    
ShowPlayerDialog(playeridVeiculosLista9DIALOG_STYLE_LIST,"~> Veнculos Casas Lista 9",Lista9,"Comprar","Cancelar");
    }
  }
}
    else if(
dialogid == VeiculosLista1)
    {
    if(
response)
    {
       if(
listitem ==  0)
    {
        
OnPlayerCommandText(playerid"/veiculodacasa Admiral");
    }
    if(
listitem ==  1)
    {
        
OnPlayerCommandText(playerid"/veiculodacasa Alpha");
    }
    if(
listitem ==  2)
    {
        
OnPlayerCommandText(playerid"/veiculodacasa Banshee");
    }
    if(
listitem ==  3)
    {
        
OnPlayerCommandText(playerid"/veiculodacasa Bandito");
    }
    if(
listitem ==  4)
    {
        
OnPlayerCommandText(playerid"/veiculodacasa BF-400");
    }
    if(
listitem ==  5)
    {
        
OnPlayerCommandText(playerid"/veiculodacasa BF-Injection");
    }
    if(
listitem ==  6)
    {
        
OnPlayerCommandText(playerid"/veiculodacasa Bike");
    }
    if(
listitem ==  7)
    {
        
OnPlayerCommandText(playerid"/veiculodacasa Blade");
    }
    if(
listitem ==  8)
    {
        
OnPlayerCommandText(playerid"/veiculodacasa Blista Compact");
    }
    if(
listitem ==  9)
    {
        
OnPlayerCommandText(playerid"/veiculodacasa Bloodring Banger");
    }
    if(
listitem ==  10)
    {
        
OnPlayerCommandText(playerid"/veiculodacasa Bmx");
    }
    if(
listitem ==  11)
    {
        
OnPlayerCommandText(playerid"/veiculodacasa Bobcat");
    }
    if(
listitem == 12)
    {
        new 
Listas []= "Veнculos - Lista 1\nVeнculos - Lista 2\nVeнculos - Lista 3\nVeнculos - Lista 4\nVeнculos - Lista 5\nVeнculos - Lista 6\nVeнculos - Lista 7\nVeнculos - Lista 8\nVeнculos - Lista 9";
        
ShowPlayerDialog(playeridVeiculosCasasDIALOG_STYLE_LIST,"Escola uma Lista de Veiculos para Comprar",Listas,"OK","Sair");
    }
  }

PHP код:
CMD:veiculodacasa(playerid,params[])
{
    
format(Global, sizeof(Global), "Casas/Casaid%d.ini"playericonhouse[playerid]);
    new 
timestamp GetTickCount();
    if(
timestamp inhousepickup[playerid] > 4000)
    {
        
SendClientMessageplayeridBRANCO"[ x ] Vocк nгo estб em uma casa !" );
        return 
1;
    }
    new 
pname[24];
    
GetPlayerName(playeridpname24);
    if(
cInfo[playericonhouse[playerid]][GotCar] == 0)
    {
        
SendClientMessage(playerid,BRANCO"[ x ] Essa casa nгo pode ter veнculo!");
        return 
1;
    }
    if(
DOF2_GetInt(Global, "TemCarro") == 1)
    {
        
SendClientMessage(playerid,BRANCO"[ x ] Vocк jб possui um veнculo use /venderveiculo!");
        return 
1;
    }
    if(
strcmp(hInfo[playericonhouse[playerid]][Name],pname,true)==0)
    {
        new 
carname[40];
        if(
sscanf(params"s[50]"carname))
        {
            
SendClientMessage(playeridBARRA_AVISO"[ x ] Uso correto: /VeiculodaCasa [nome do veнculo]");
        }
        else
        {
            new 
abc;
            for(new 
i=0;i<MAX_BUY_CARS;i++)
            {
                if(
strcmp(carnameBuyable_Cars[i][CarName], true) == 0)
                {
                    if(
GetPlayerMoney(playerid) < Buyable_Cars[i][CarCost])
                    {
                        
SendClientMessage(playerid,BRANCO"[ x ] Vocк nгo tem dinheiro o suficiente para comprar esse veнculo!");
                        return 
1;
                    }
                    
GivePlayerMoney(playerid, - Buyable_Cars[i][CarCost]);
                    
DOF2_SetInt(Global, "TemCarro"1);
                    
hInfo[playericonhouse[playerid]][TemCarro] = 1;
                    
cInfo[playericonhouse[playerid]][CarModel] = Buyable_Cars[i][CarModel];
                    
DOF2_SetInt(Global, "CarModel"Buyable_Cars[i][CarModel]);
                    
DOF2_SetInt(Global, "PVENDA"Buyable_Cars[i][CarCost]);
                    
format(Global, sizeof(Global), "[ > ] Vocк comprou o veнculo %s para sua casa."carname);
                    
SendClientMessage(playeridBRANCO, Global);
                    
cInfo[playericonhouse[playerid]][NewCar] = 1;
                    
DOF2_SaveFile();
                    
abc 1;
                }
            }
            if(
abc == 0)
            {
                
SendClientMessage(playerid,BRANCO"[ x ] Nгo temos esse veнculo em nossa lista!");
                
abc 0;
            }
        }
    }
    else
    {
        
SendClientMessage(playerid,BRANCO"[ x ] Vocк nгo й dono dessa casa!");
    }
    return 
1;

Reply
#4

PHP код:
OnPlayerCommandText(playerid"/veiculodacasa Banshee"); > cmd_veiculodacasa(playerid"Banshee"); 
Ta falando disso?
Reply
#5

sim sim e tipo quando arrumei a include zcmd ela bugo os comandos que eu tinha no gm em strcmp como resolver ? ou terei que mudar tudo pra zcmd
Reply
#6

Vocк Nгo Pode Usar Dois Tipos De Criaзгo De Comandos ( zcmd, strcmp ) No Caso Ou Use Uma Ou Outra Para Todos Comandos Da GameMode.
Reply
#7

Uй, muda para zcmd e testa, se caso houver bug/ajuda tu solicita atravйs desse mesmo topico.
Reply
#8

havera conflito entre digamos um filterscript em strcmp e o game mode ta em zcmd ? ou nгo?
Reply
#9

Quote:
Originally Posted by SkyneTSAMP
Посмотреть сообщение
Vocк Nгo Pode Usar Dois Tipos De Criaзгo De Comandos ( zcmd, strcmp ) No Caso Ou Use Uma Ou Outra Para Todos Comandos Da GameMode.
Claro q pode, a diferenзa de ambos estб basicamente na velocidade, strcmp й mais para comparar duas strings, mas n deixa de ser funcional.

@EDIT

RE: Nгo hб conflito.

O ъnico conflito serб entre 2 comandos iguais, mas n no processador de comandos.
Reply
#10

Sim rep+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)