Raised This Month: $ Target: $400
 0% 

Native help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-13-2018 , 14:31   Re: Native help
Reply With Quote #8

this is the code that needs to be fixed. This isn't my code, just edited the accuracy part into the level part but it doesn't work. get_player_level() is made like i posted before in the test version. The only difference is that i don't set iLevel[33] = 5, iLevel[33] changes all the time when players level up killing people.

PHP Code:
format_top15(sBuffer[MAX_BUFFER_LENGTH 1])
{
    new 
iMax get_statsnum()
    new 
izStats[8], izBody[8], istate[4]//, SzName[32]
    
new iLen 0
 
    
//get_user_name(id, szName, 31);
   
    
if (iMax 10)
        
iMax 10
    
new lNick[20], lKills[20], lDeaths[20], lHs[20], lAcc[20], lLvl[20]
    
format(lNick19"Nick")
    
format(lKills19"Kills")
    
format(lDeaths19"Deaths")
    
format(lHs19"Headshots")
    
format(lLvl,charsmax(lLvl), "Level")
    
//format(lAcc, 19, "Accuracy")
    //format(knifeGetLevel(id), 19, "Level")
 
    //ucfirst(lAcc)
 
    
iLen formatsBufferMAX_BUFFER_LENGTH,
                  
"<head><META http-equiv=Content-Type content='text/html ;charset=UTF-8'></head><style>body{background:#191818;background-image: url(^"http://i63.tinypic.com/2v0g7br.jpg^");margin:5pt;padding:2pt;font-family:Tahoma;color:#eaeaea}.A{background-color:#262626;opacity:0.6;filter:alpha(opacity=60);}.B{background-color:#0b0b0b;opacity:0.6;filter:alpha(opacity=60);}td{font-size:15px}</style><center><table width=100%% background=^"^">" ) 
    
iLen += formatsBuffer[iLen], MAX_BUFFER_LENGTH iLen,
                  
"<tr><td><br/> <td></tr><tr><td><br/> <td></tr><tr><td><br/> <td></tr><tr><td><br/> <td></tr><tr><td><br/> <b><td></tr><tr><td>%s<td>%s<td>%s<td>%s<td>%s<td>%s</b>",
                  
"#"lNicklKillslDeathslHslLvl //knifeGetLevel(id) )
   
    
new players[32], inumid
    get_players
(playersinum)
   
    for(new 
iinumi++) {
        
id players[i]
    }
   
    for (new 
0iMax && MAX_BUFFER_LENGTH iLen 0i++)
    {
        if (
equal(istate,"A")) copy(istate,3,"B")
                else 
copy(istate,3,"A")
                
get_stats(iizStatsizBodyt_sNameMAX_NAME_LENGTH,sAuthid,MAX_NAME_LENGTH)
        while( 
contain t_sName"<" ) != -)
                
replacet_sName,MAX_BUFFER_LENGTH 1,"<""[" )
        while( 
contain t_sName">" ) != -)
                
replacet_sName,MAX_BUFFER_LENGTH 1,">""]" )
        if(
get_pcvar_num(authidgoster) == 1){
            
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH iLen"<tr class=%s><td>%d<td>%s (%s)<td>%d<td>%d<td>%d<td>%d%%",istate1t_sNamesAuthidizStats[STATS_KILLS],
                
izStats[STATS_DEATHS], izStats[STATS_HS], get_player_level(id))
 
        }
        else{
            
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH iLen"<tr class=%s><td>%d<td>%s <td>%d<td>%d<td>%d<td>%d%%",istate1t_sNameizStats[STATS_KILLS],
                
izStats[STATS_DEATHS], izStats[STATS_HS], get_player_level(id))
 
 
        }
    }
    
copy(sBuffer[iLen],MAX_BUFFER_LENGTH iLen,"</table></center>")

__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode