Optimizar cуdigo.
#2

PHP код:
case DIALOG_VERMIEMBROSCLAN:
{
    if(
response)
    {
        new 
DBResult:qresult;
        new 
count=0,string[128], 
        
format(stringsizeof(string), "SELECT Nick,Ks,Dhs FROM `USERS` WHERE `Clan` = '%s' COLLATE NOCASE",DB_Escape(JugadorInfo[playerid][zClan]));
        
qresult db_query(ZLDBstring);
        
count db_num_rows(qresult);
        if(
count 0)
        {
            new 
final_string[1280],MiInfoNick[MAX_PLAYER_NAME],MiInfoKill,MiInfoDeath;
            
strcat(final_string,"#\tNick\tKdr\n%s");
            for(new 
a=0;a<count;a++)
             {
                
db_get_field_assoc(qresult"Nick",MiInfoNick,sizeof MiInfoNick);
                
db_get_field_assoc(qresult"Ks",string,sizeof string);
                
MiInfoKill strval(string);
                
db_get_field_assoc(qresult"Dhs",string,sizeof string);
                
MiInfoDeath strval(string);
                
format(string,sizeof(string),"%d\t%s\t%0.2f",a+1,MiInfoNick,float(MiInfoKill)/float(MiInfoDeath));
                
strcat(final_string,string);
                
db_next_row(qresult);
            }
            
ShowPlayerDialog(playerid,DIALOG_SINUSODIALOG_STYLE_TABLIST_HEADERS,"-§- Miembros del clan -§-",final_string,"Cerrar","");
            
PlayerPlaySound(playerid,1139,0.0,0.0,0.0);
        }
        
db_free_result(qresult);
    }

Reply


Messages In This Thread
Optimizar cуdigo. - by dannypanda05 - 04.03.2016, 00:13
Re: Optimizar cуdigo. - by Daniel-92 - 04.03.2016, 17:49
Respuesta: Optimizar cуdigo. - by dannypanda05 - 04.03.2016, 23:50
Re: Optimizar cуdigo. - by Daniel-92 - 05.03.2016, 00:28
Re: Optimizar cуdigo. - by SickAttack - 05.03.2016, 01:14
Respuesta: Optimizar cуdigo. - by dannypanda05 - 05.03.2016, 03:03

Forum Jump:


Users browsing this thread: 2 Guest(s)