Small question about dialog listitem variable.
#1

Hello guys i have a little question about listitem in Dialogs.

I wanna show my owned cars in a dialog list to manage it (change colors etc..) it shows fine in a list
but how i can pass a variable to detect the vehicleid selected on the dialog when i reach OnDialogResponse?

This is the command that i made to show my cars in a list.

PHP Code:
CMD:misvehiculos(playeridparam[])
{
    if(!
GetPlayerVehiclesCount(playerid)) return Message(playeridCOLOR_MSG_AVISOS"No tienes vehнculos.");
    new 
sEncontrar[64];
    for(new 
0MAX_VEHICLESi++)
    {
        if(
cInfo[i][ownerID] == pInfo[playerid][pID])
        {
            
format(sEncontrarsizeof(sEncontrar), "%s [M: %d] "VehicleNames[cInfo[i][model]-400], cInfo[i][matricula]);
          
        }
    }
    
ShowPlayerDialog(playerid515DIALOG_STYLE_LIST"GPS de Vehнculos"sEncontrar"Aceptar""Cancelar");
    return 
1;

Thanks in advance.
All help will be rep!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)