Raised This Month: $95 Target: $400
 23% 

Total Kills with mySQL


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Statistical        Approver:   v3x (159)
Sonic7145
Member
Join Date: Jul 2005
Location: USA
Old 01-08-2006 , 15:55   Total Kills with mySQL
Reply With Quote #1

Total Kills with mySQL
Version 1.1

Credits
Suicid3, for helping me get the SQL queries correct.
Hawk552, Brad, v3x for suggesting the cvars from sql.cfg.

Description
This plugin will automatically create a table when ran. When a user joins it will log their name, Steam ID, and start them with 0 frags. A red hudmessage will be displayed on the right side of the screen, showing their total kills on this server. Each time they kill, it is logged into the database, and when they return to this server, the hud message will show whatever kills they had when they left last time - and it will keep adding this game as well.

Usage
Edit sql.cfg and change the settings to match your SQL settings. The script will automatically detect them and automatically create the table. All you have to do is edit that file, compile it, and run it. =)

(Make sure SQL is running)


Things to add/fix
-If user changes name, update the SQL.
-Kill to Death Ratio, perhaps display number of deaths.
-Play a sound every x frags a client gets.
-Add a vault version, instead of using SQL
-Committing suicide results in a frag
-So does killing teammates ^

Tested on TS. (any others?)
Attached Files
File Type: sma Get Plugin or Get Source (totalkills_sql.sma - 3283 views - 3.1 KB)

Last edited by Sonic7145; 12-22-2007 at 12:45. Reason: Adding to "To-Do" list.
Sonic7145 is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-08-2006 , 15:59  
Reply With Quote #2

SQL seems a bit of a sledgehammer to kill a fly, unless you have like 10,000 people on your server a day.

Maybe integrate an option to use vault / SQL?

Otherwise, great idea.

EDIT: also, you can read from the SQL file in AMXX, the cvars attached to it, or whatever. You should implement cvars in some way though, as about 90% of server admins with AMXX don't know how to compile a plugin.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Sonic7145
Member
Join Date: Jul 2005
Location: USA
Old 01-08-2006 , 16:01  
Reply With Quote #3

Quote:
Originally Posted by Hawk552
Maybe integrate an option to use vault / SQL?

Otherwise, great idea.

EDIT: also, you can read from the SQL file in AMXX, the cvars attached to it, or whatever. You should implement cvars in some way though, as about 90% of server admins with AMXX don't know how to compile a plugin.
Thanks =)
Great suggestions - if it's approved I'll try and make those available in the next version.
Sonic7145 is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 01-08-2006 , 16:58  
Reply With Quote #4

I dont know.. isant this kinda ike ranks? just that it only logs kils in a mysql table instead of a file?
Styles is offline
Send a message via AIM to Styles Send a message via MSN to Styles
Sonic7145
Member
Join Date: Jul 2005
Location: USA
Old 01-08-2006 , 17:10  
Reply With Quote #5

I've never seen the Rank plugin, but this doesn't rank the players - it simply displays the user their statistics, and logs information for the server admin.
Sonic7145 is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 01-08-2006 , 17:36  
Reply With Quote #6

You're more likely to get it approved if you implement Hawk's suggestions now.
Brad is offline
Sonic7145
Member
Join Date: Jul 2005
Location: USA
Old 01-08-2006 , 17:58  
Reply With Quote #7

Quote:
Originally Posted by Brad
You're more likely to get it approved if you implement Hawk's suggestions now.
Thanks - the cvars from the sql file have now been implemented.
Sonic7145 is offline
eFrigid
Senior Member
Join Date: Aug 2005
Location: 3o3
Old 01-15-2006 , 21:21  
Reply With Quote #8

Pretty cool
__________________
lol
eFrigid is offline
Send a message via AIM to eFrigid Send a message via MSN to eFrigid Send a message via Skype™ to eFrigid
Sonic7145
Member
Join Date: Jul 2005
Location: USA
Old 01-15-2006 , 23:51  
Reply With Quote #9

Quote:
Originally Posted by eFrigid
Pretty cool
Thanks =D
Sonic7145 is offline
Xphixe8
Junior Member
Join Date: Oct 2005
Old 02-02-2006 , 22:39   I got a question
Reply With Quote #10

Can u possibly make it where u can be able 2 save frags on your K board like when u press tab and your K come out , well keep it on your kills only, not deaths and it just builds up all your frags that u have collected from first being in server
__________________
[img]http://img224.**************/img224/84/xsigamxxcopy1vb.gif[/img]
Xphixe8 is offline
Reply


Thread Tools
Display Modes

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 23:09.


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