Raised This Month: $ Target: $400
 0% 

help with MOTD and stats


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Rolnaaba
Veteran Member
Join Date: May 2006
Old 10-30-2006 , 13:04   help with MOTD and stats
Reply With Quote #1

I am creating a plugin that stores the kills you get with the knife in vault and then loads them later then you can type /knife (or something) in chat to bring a MOTD that will display the 15 people with the most knife kills, but I need some help, not sure how to make a MOTD come up in PAWN and not sure how to find their rankings this is what I have so far:
Code:
#include <amxmodx> #include <amxmisc> new KnifeScore[33] //global knife score public plugin_init() {     register_plugin("Knife Score", "1.0", "Rolnaaba")     register_cvar("amx_knifescore", "1")     register_clcmd("say /knife", "ShowScores")     register_clcmd("amx_knife", "ShowScores") } public ShowScores(id) {     //this is MOTD dunno how to do it } public SaveScore(id) {         new authid[32]     get_user_authid(id, authid, 31)         new vaultkey[64], vaultdata[64]         format(vaultkey,63,"Knife-Score-%s",authid)     format(vaultdata,63,"%d",KnifeScore[id])     set_vaultdata(vaultkey,vaultdata) //save score } public LoadScore(id) {         new authid[32]     get_user_authid(id,authid,31)     new vaultkey[64], vaultdata[64]         format(vaultkey,63,"Knife-Score-%s",authid)     get_vaultdata(vaultkey,vaultdata,63)     KnifeScore[id] = str_to_num(vaultdata) //load score } public client_connect(id) {     if(get_cvar_num("amx_knifescore") == 1) {         LoadScore(id) //load score and display in chaty their score         client_print(id, print_chat, "Your knife score is currently %i", KnifeScore[id])             }     else {         return PLUGIN_HANDLED     } } public client_disconnect(id) {     if(get_cvar_num("amx_knifescore") == 1) {         SaveScore(id) //save their score when they leave     }     else {         return PLUGIN_HANDLED     } }
__________________
DO NOT PM me about avp mod.
Rolnaaba 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 04:51.


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