Problemirijilla con un comando
#9

Asн proba:

pawn Код:
CMD:encontrar(playerid, params[])
{
    print("0");
    new
        sEncontrar[64],
        Count;
    print("1");
    for(new i = 0; i < MAX_VEHICLES; i++)
    {
        print("2");
        if(cInfo[i][ownerID] == pInfo[playerid][pID])
        {
            print("3");
            format(sEncontrar, sizeof(sEncontrar), "%d - Vehнculo: %s | ID: %d \n", Count, VehicleNames[cInfo[i][model]], i);
            Count++;
            print("4");
        }
        print("5");
    }
    print("6");
    ShowPlayerDialog(playerid, DIALOG_STYLE_MSGBOX, 0 ,"Lista de tus vehнculos", sEncontrar, "Aceptar", "Cancelar");
    print("7");
    return 1;
}
Si no sale ninguno el problema no estб en el comando xD.

De todos modos tu comando tiene un problema, si tiene mбs de un vehнculo le saldrб sуlo uno. Tendrнas que hacerlo asн:

pawn Код:
CMD:encontrar(playerid, params[])
{
    print("0");
    new
        sEncontrar[64],
        Count;
    print("1");
    for(new i = 0; i < MAX_VEHICLES; i++)
    {
        print("2");
        if(cInfo[i][ownerID] == pInfo[playerid][pID])
        {
            print("3");        
            if(i == 0) format(sEncontrar, sizeof(sEncontrar), "%d - Vehнculo: %s | ID: %d", Count, VehicleNames[cInfo[i][model]], i);
            else format(sEncontrar, sizeof(sEncontrar), "%s\n%d - Vehнculo: %s | ID: %d", sEncontrar, Count, VehicleNames[cInfo[i][model]], i);        
            Count++;
            print("4");
        }
        print("5");
    }
    print("6");
    ShowPlayerDialog(playerid, DIALOG_STYLE_MSGBOX, 0 ,"Lista de tus vehнculos", sEncontrar, "Aceptar", "Cancelar");
    print("7");
    return 1;
}
Reply


Messages In This Thread
Problemirijilla con un comando - by LuisR - 17.08.2014, 18:58
Respuesta: Problemirijilla con un comando - by JustBored - 17.08.2014, 19:09
Respuesta: Problemirijilla con un comando - by LuisR - 17.08.2014, 19:18
Respuesta: Problemirijilla con un comando - by JustBored - 17.08.2014, 19:29
Respuesta: Problemirijilla con un comando - by [J]ulian - 17.08.2014, 19:42
Respuesta: Problemirijilla con un comando - by LuisR - 17.08.2014, 20:09
Respuesta: Problemirijilla con un comando - by [J]ulian - 17.08.2014, 20:15
Respuesta: Problemirijilla con un comando - by LuisR - 17.08.2014, 21:39
Respuesta: Problemirijilla con un comando - by [J]ulian - 17.08.2014, 21:49
Respuesta: Problemirijilla con un comando - by LuisR - 17.08.2014, 21:55

Forum Jump:


Users browsing this thread: 1 Guest(s)