Switch y Case
#1

Hola, alguien podrнa ayudarme con esto?

Lo que quiero hacer es poner el nombre "Dinero" en el inventario,
igual a como lo hice con los nombres de las armas.
Pero no sй que nъmero poner en el "case", como poner que si tengo mбs de
$1 aparezca "Dinero" en ves de "Lugar Vacнo", no sй si me entienden, no me sй explicar bien


pawn Код:
new Lugar[2][16], Info[100];
    switch(Informacion[playerid][Armas])
    {
        case 0:Lugar[0]="Lugar Vacнo";
        case 22:Lugar[0]="9mm";
        case 22:Lugar[0]="9mm silenciada";
        case 24:Lugar[0]="Desert Eagle";
    }
    switch(Informacion[playerid][Dinero])
    {
        case 0:Lugar[1]="Lugar Vacнo";//Si tengo $0 aparece "Lugar Vacнo" en el dialogo, anda bien.
        case 0:Lugar[1]="Dinero";//Pero que poner en este case? si pongo 1 solo aparece "Dinero" si tengo $1.
    }                                //la idea es que aparezca "Dinero" si tengo $1 o mбs.



    format(string, sizeof(string), "%s\n", Lugar[0]);
    strcat(Info, string);
    format(string, sizeof(string), "%s\n", Lugar[1]);
    strcat(Info, string);
    ShowPlayerDialog(playerid, DIALOGO_INVENTARIO, DIALOG_STYLE_LIST, "Inventario", Info, "Aceptar", "Cancelar");
Reply


Messages In This Thread
Switch y Case - by Mamoru - 07.08.2016, 13:51
Respuesta: Switch y Case - by Zume - 07.08.2016, 14:31
Respuesta: Switch y Case - by Mamoru - 07.08.2016, 15:00
Re: Switch y Case - by bm0z - 08.08.2016, 11:45
Re: Switch y Case - by RIDE2DAY - 08.08.2016, 14:56
Respuesta: Switch y Case - by Zume - 08.08.2016, 23:37
Respuesta: Switch y Case - by Whyd - 09.08.2016, 09:14
Respuesta: Re: Switch y Case - by Glimma - 09.08.2016, 13:49

Forum Jump:


Users browsing this thread: 1 Guest(s)