[DUDA] Mysql
#4

Aqui un poco mбs optimizado el script y en estilo de lista.

pawn Код:
CMD:prueba(playerid, params[])
{
  mysql_function_query(conexion, "SELECT `nombre` FROM `usuarios` WHERE `encendedor` =  '1' LIMIT 0, 1",   true, "EnlistarJugadoresConEncendedor", "i", playerid);
  return 1;
}

public EnlistarJugadoresConEncendedor(playerid)
{
    new rowCount, fieldCount, playersName[MAX_PLAYER_NAME];
    cache_get_data(rowCount, fieldCount, conexion);
    if(!rowCount) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Error", "No hay jugadores con el encendedor activado.", "Cerrar", "");
    for(new rowIndex; rowIndex < rowCount; ++rowIndex)
    {
         new string2[30] = EOS;
         cache_get_row(rowIndex, 0, playersName, conexion);
         format(string2, sizeof(string2), "%s%s\n", string2, playersName);
    }  
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Jugadores con encendedor", string, "Cerrar", "");
    return 1;
}
Un saludo.
Reply


Messages In This Thread
[DUDA] Mysql - by ValenRatti - 25.02.2013, 00:33
Respuesta: [DUDA] Mysql - by hotspicytaco - 25.02.2013, 02:20
Respuesta: [DUDA] Mysql - by OTACON - 25.02.2013, 02:28
Respuesta: [DUDA] Mysql - by oOFotherOo - 25.02.2013, 14:47
Re: [DUDA] Mysql - by ValenRatti - 25.02.2013, 22:12
Respuesta: Re: [DUDA] Mysql - by oOFotherOo - 25.02.2013, 22:21
Re: [DUDA] Mysql - by ValenRatti - 27.02.2013, 21:15
Respuesta: Re: [DUDA] Mysql - by oOFotherOo - 27.02.2013, 22:22
Respuesta: [DUDA] Mysql - by Jupit3r - 27.02.2013, 23:16
Respuesta: [DUDA] Mysql - by oOFotherOo - 27.02.2013, 23:39

Forum Jump:


Users browsing this thread: 2 Guest(s)