AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   need help (https://forums.alliedmods.net/showthread.php?t=184966)

yamin 05-11-2012 08:26

need help
 
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"))
    { 


bazhenov93 05-11-2012 11:28

Re: need help
 
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.

yamin 05-11-2012 16:07

Re: need help
 
ok fixed

FODDER 05-11-2012 19:02

Re: need help
 
http://forums.alliedmods.net/showthread.php?t=7999

yamin 05-12-2012 06:55

Re: need help
 
can anyone convert?(to sqlx)


All times are GMT -4. The time now is 07:08.

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