Raised This Month: $51 Target: $400
 12% 

need help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
yamin
BANNED
Join Date: Jan 2012
Location: Sharjah
Old 05-11-2012 , 08:26   need help
Reply With Quote #1

can anyone add for me /my_knife (displays total knife kills) and /top15_knife (which displays top15 players by knife rank)
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "kniferank"
#define VERSION "1.0"
#define AUTHOR "yamin"

#define host "localhost"
#define user "amxx"
#define pass "amx"
#define db "amxmodx"

new Handle:sqlg_query

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
    
showkniferank register_cvar("amx_knife_mod","1");
    

}

public 
plugin_cfg(){
    
sql SQL_MakeDbTuple(host,user,pass,db)
    
formatex(g_query,511,"CREATE TABLE IF NOT EXISTS `knife_rank` (name VARCHAR(32), kniferank INT)")
    
SQL_ThreadQuery(sql,"query",g_query)
    
}

public 
handle_say(id)
{
    static 
said[9]
    
read_argv(1,said,8);
    
    
id(equali(said,"/my_knife"))
    { 

Last edited by yamin; 05-12-2012 at 03:56.
yamin is offline
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 05-11-2012 , 11:28   Re: need help
Reply With Quote #2

You cvar is incorrect.

PHP Code:
showkniferank register_cvar(amx_knife_mod","1"); 
-->

PHP Code:
showkniferank register_cvar("amx_knife_mod","1"); 
Also you need add this after/before ( new Handle:sql, g_query ) -> new showkniferank

When I back to my PC I will try convert this one to SQL.

Last edited by bazhenov93; 05-11-2012 at 11:33. Reason: URL Updated.
bazhenov93 is offline
yamin
BANNED
Join Date: Jan 2012
Location: Sharjah
Old 05-11-2012 , 16:07   Re: need help
Reply With Quote #3

ok fixed

Last edited by yamin; 05-12-2012 at 03:55.
yamin is offline
FODDER
Member
Join Date: Mar 2012
Location: Florida, United States
Old 05-11-2012 , 19:02   Re: need help
Reply With Quote #4

http://forums.alliedmods.net/showthread.php?t=7999
FODDER is offline
yamin
BANNED
Join Date: Jan 2012
Location: Sharjah
Old 05-12-2012 , 06:55   Re: need help
Reply With Quote #5

can anyone convert?(to sqlx)
yamin 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 03:14.


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