[Ayuda] Inventario
#1

Hola, hoy estaba haciendo un inventario para mi gamemode pero el problema es que al seleccionar un item de la lista no pasa nada, les dejo el cуdigo para que lo vean.
PHP код:
CMD:inventario(playeridparams[])
{
    new 
asd[64];
    
format(asdsizeof(asd), "Bebidas(s): %i\nComestibles(s): %i\nBotiquin(es): %i",Informacion[playerid][pJugo],Informacion[playerid][pPizza],Informacion[playerid][pBotiquin]);
    
ShowPlayerDialog(playeridDIALOG_INVENTARIODIALOG_STYLE_LIST"Tu inventario"asd"Seleccionar""Salir");
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
        case 
DIALOG_INVENTARIO:
        {
            if(
response == 1)
            {
                switch(
listitem)
                {
                    case 
0:
                    {
                        
ShowPlayerDialog(playeridDIALOG_SEDDIALOG_STYLE_MSGBOX"їQue deseas hacer con el objeto seleccionado?""""Usar""Tirar");
                    }
                    case 
1:
                    {
                        
ShowPlayerDialog(playeridDIALOG_HAMBREDIALOG_STYLE_MSGBOX"їQue deseas hacer con el objeto seleccionado?""""Usar""Tirar");
                    }
                    case 
2:
                    {
                        
ShowPlayerDialog(playeridDIALOG_BOTIQUINDIALOG_STYLE_MSGBOX"їQue deseas hacer con el objeto seleccionado?""""Usar""Tirar");
                    }
                }
            }
        }
        case 
DIALOG_SED:
        {
            if(
response == 1)
            {
                
Informacion[playerid][pSed] = 100;
                  
SetProgressBarValue(Sed[playerid], 100);
                
Informacion[playerid][pJugo]--;
                
ApplyAnimation(playerid"FOOD""EAT_Burger"3.0000000);
            }
            else
            {
                
SendClientMessage(playeridCOLOR_ROJO"Descartaste una Botella de jugo de tu inventario.");
                
Informacion[playerid][pPizza]--;
            }
        }
        case 
DIALOG_HAMBRE:
        {
            if(
response == 1)
            {
                
Informacion[playerid][pHambre] = 100;
                
SetProgressBarValue(Hambre[playerid], 100);
                
Informacion[playerid][pPizza]--;
                
ApplyAnimation(playerid"FOOD""EAT_Burger"3.0000000);
            }
            else
            {
                
SendClientMessage(playeridCOLOR_ROJO"Descartaste una Pizza de tu inventario.");
                
Informacion[playerid][pPizza]--;
            }
        }
        case 
DIALOG_BOTIQUIN:
        {
            if(
response == 1)
            {
                
SetPlayerHealth(playerid100.0);
                
SendClientMessage(playerid, -1"Te haz curado");
                
Informacion[playerid][pBotiquin]--;
                
ApplyAnimation(playerid"BOMBER""BOM_Plant"4.00110,0);
            }
            else
            {
                
SendClientMessage(playeridCOLOR_ROJO"Descartaste un Botiquin de tu inventario.");
                
Informacion[playerid][pBotiquin]--;
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
[Ayuda] Inventario - by Ghost112397 - 14.02.2015, 23:22
Respuesta: [Ayuda] Inventario - by Ghost112397 - 15.02.2015, 14:40
Respuesta: [Ayuda] Inventario - by Ghost112397 - 17.02.2015, 02:04
Respuesta: [Ayuda] Inventario - by DesingMyCry - 17.02.2015, 02:27

Forum Jump:


Users browsing this thread: 1 Guest(s)