Raised This Month: $ Target: $400
 0% 

Prokreedz edit top10 problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kinoute
New Member
Join Date: Jan 2007
Old 01-29-2007 , 21:42   Prokreedz edit top10 problem
Reply With Quote #1

Hello,

I use this plugin but I have a problem with the /top15, indeed when a player is present in the top and when he does a new score, his name is again added on a new line and the old score is always here.. I think its normal and It is the plugin which makes that but I thus meet myself with a top performed with doubloons.. How fix that?

I found this part of the prokreedz.sma :

PHP Code:
public topten_update(id) { 
     new 
szvault[64], szmap[32], kreedztime 
     get_mapname
(szmap,32
     
format(szvault,64,"pk_%s",szmap
     
kreedztime get_systime() - timer_time[id-1
      
     new 
vault nvault_open(szvault// Now we have to sort the new list [IMG]http://xtreme-jumps.eu/e107_images/emoticons/smilie11.gif[/IMG]  
     
if(vault != -1) { 
         new 
szkey[8
         for(new 
i=1;i<=10;i++) { 
             new 
szreturn[128
             new 
arg1[32], arg2[8
             
format(szkey,8,"%d",i
             
nvault_get(vault,szkey,szreturn,128
              
             if(
parse(szreturn,arg1,32,arg2,8) == || kreedztime str_to_num(arg2)) { 
                 new 
sznew[128], szname[32
                 
get_user_name(id,szname,32
                 
format(sznew,128,"^"%s^" ^"%d^" ^"%d^"",szname,kreedztime,checkpointnum[id-1]) 
                 if(
10) { 
                     for(new 
x=10;x>i;x--) { 
                         new 
sztemp[128], sztempkey[8
                         
format(sztempkey,8,"%d",x-1
                         
nvault_get(vault,sztempkey,sztemp,128
                          
                         if(!
equal(sztemp,"")) { 
                             
format(sztempkey,8,"%d",x
                             
nvault_pset(vault,sztempkey,sztemp
                         } 
                     } 
                 } 
                 
nvault_pset(vault,szkey,sznew
                  
                 if(
== 1
                     
client_print(0,print_chat,"[ProKreedz] %s has established a new record",szname
                  
                 break 
             } 
         } 
         
nvault_close(vault
     } 
 } 
I suppose that it is in this place that the top is updated, how to limit the number of records by player to the only one in the top ? I would like to have twice no same player in top10.


thank you in advance and sorry for my bad english!
kinoute 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 00:40.


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