Raised This Month: $ Target: $400
 0% 

Help: Pmtop Code


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Carlen20
Senior Member
Join Date: Jun 2011
Location: Sweden
Old 02-10-2012 , 09:02   Help: Pmtop Code
Reply With Quote #1

Okej I gonna do this pretty simple to read it for you guys I have this code and i wonder why this pmtop15 wont work.


PHP Code:
public Show_Top(id) {
    new 
name[32], temp[64]
    for(new 
iMaxPlayersi++) {
        if(
is_user_connected(i))
            
Save_MySql(i)
    }
    
    
format(SQL_Querycharsmax(SQL_Query), "SELECT id, name, totalpund FROM Pundmod ORDER BY totalpund DESC LIMIT 0,15")
    
    new 
Handle:Query SQL_PrepareQuery(SQLite_ConnectionSQL_Query)
    if(!
SQL_Execute(Query)) {
        
SQL_QueryError(QuerySQL_Errorsizeof(SQL_Query)-1)
        
server_print("[%s][SQLite] %s"PLUGINSQL_Error)
        return 
PLUGIN_HANDLED
    
}
    new 
menu menu_create("Tc3 Top 15""TopMenu")
    new 
sztempid[2]
    new 
rows1 SQL_NumResults(Query)
    new 
key[6], tcash[15], name1[15][64];
    for(new 
i=0;i<rows1;i++) {
        new 
temp[512];
        
format(temp511"%s:\r %i"name1[i], tcash[i])
        
num_to_str(i,key,sizeof(key)-1)
        
menu_additem(menutempkey0);
    }
    
menu_display(idmenu)

    while(
SQL_MoreResults(Query)) {
        
SQL_ReadResult(Query1name31)
        
formatex(temp63""SQL_ReadResult(Query2))
        
num_to_str(SQL_ReadResult(Query0), sztempidcharsmax(sztempid))
        
menu_additem(menutempsztempid0)

        
SQL_NextRow(Query)
    }
    
menu_display(idmenu)
    
SQL_FreeHandle(Query)

    return 
PLUGIN_HANDLED

public 
TopMenu(idmenuitem) {
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;

Could someone help me to make this work!?.
__________________
Nothing are impossible if you just use your mind!

Quote:
Originally Posted by NiceGuyx View Post
P.S: i'm the best coder here


Last edited by Carlen20; 02-10-2012 at 09:07.
Carlen20 is offline
 



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 23:14.


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