Raised This Month: $ Target: $400
 0% 

Simple Pointbased RankStats


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 05-28-2009 , 12:04   Re: Simple Pointbased RankStats
Reply With Quote #1

Use the XP mod tutorial, inplent SQL support to it?

And what about "the xp mod doesn't save as points" - it saves a value. You can just rename the XP thing to points.
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
Pinatz
Member
Join Date: Dec 2008
Old 05-28-2009 , 20:02   Re: Simple Pointbased RankStats
Reply With Quote #2

yup I started to implement my code after the guide by flyeni6 -
PHP Code:
new experience
                experience 
= ((PlayerEP[pTouched]-PlayerEP[pToucher])/100)
                if (
experience <= 1)
                    
experience 2
                
if (PlayerEP[pTouched] <= 1000)
                    
experience 1
                
if (PlayerEP[pTouched] <= 0)
                    
experience 0
                PlayerEP
[pToucher] += experience
                PlayerEP
[pTouched] -= experience
                
if (PlayerEP[pTouched] <= 0) {
                    
PlayerEP[pTouched] = 0
                
}
                
cs_set_user_money(pToucherPlayerEP[pToucher],1); 
I save the stats with
PHP Code:
public SaveData(id

    
// get the players steam id. We need this because we are saving by steam id 
    
new AuthID[35]
    
get_user_authid(id,AuthID,34
    new 
vaultkey[64],vaultdata[256
    
// format what is going to be in the catchmod vault file 
    
format(vaultkey,63,"%s-Mod",AuthID
    
format(vaultdata,255,"%i#",PlayerEP[id]) 
    
// save the data 
    
nvault_set(g_vault,vaultkey,vaultdata
    return 
PLUGIN_CONTINUE 

But what I don't know is how to format a MOTD message with the top15
and how to do rankings.
__________________
Pinatz is offline
Reply



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 01:35.


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