Raised This Month: $32 Target: $400
 8% 

rememberthefrags SQL 0.2.6 beta


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Statistical        Approver:   Hawk552 (427)
Podunk
Senior Member
Join Date: Nov 2005
Location: Florida
Old 05-04-2007 , 12:34   rememberthefrags SQL 0.2.6 beta
Reply With Quote #1

Code:
/*
rememberthefrags SQL
Remembers your Frags/Deaths even after reconnecting.
CVAR            Default Value    Description

rtf_id             "not set"    //Unique Identifier for this network
rtf_sql_type       "sqlite"     //mysql or sqlite
rtf_sql_host       "127.0.0.1"  //sql host
rtf_sql_user       "root"       //sql username
rtf_sql_pass       ""           //sql password
rtf_sql_db         "rtf"        //database name
rtf_sql_table      "rtf"        //table name
rtf_tickrate       5.0          //rate at which plugin runs ( LOWER = MORE CPU )
rtf_reset_newround 0            //discard data on new round ( 0 or 1 )
rtf_min_frags      0            //minimum frags before account is started
rtf_min_deaths     0            //minimum deaths before account is started

*/
new PLUGINNAME[] = "rtf_sql"
new VERSION[] = "0.2.6 beta"
new AUTHOR[] = "FoolyCooly/JGHG"
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <sqlx>
Attached Files
File Type: sma Get Plugin or Get Source (rtf_sql.sma - 2289 views - 9.1 KB)
__________________
Check out my website at http://matthewmiller.info

Last edited by Podunk; 06-13-2008 at 08:39.
Podunk is offline
Send a message via MSN to Podunk
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 05-04-2007 , 12:59   Re: rememberthefrags SQL Style
Reply With Quote #2

You should use SQLx instead of DBI, AFAIK it doesn't work to use anymore.
Here's a good tut on SQLx: http://forums.alliedmods.net/showthread.php?t=46779
Deviance is offline
Podunk
Senior Member
Join Date: Nov 2005
Location: Florida
Old 05-04-2007 , 18:31   Re: rememberthefrags SQL Style
Reply With Quote #3

"AFAIK it doesn't work to use anymore."

not true, I'm using the latest release of amxmodx, and it compiles and runs just fine

you are right about sqlx being the successor, I was using that at first, but this is my first time writing sql stuff in plugins so I opted for the much easier to implement dbi class

Last edited by Podunk; 05-04-2007 at 18:37.
Podunk is offline
Send a message via MSN to Podunk
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 05-05-2007 , 05:25   Re: rememberthefrags SQL Style
Reply With Quote #4

Quote:
Originally Posted by Podunk View Post
"AFAIK it doesn't work to use anymore."

not true, I'm using the latest release of amxmodx, and it compiles and runs just fine
Right, whatever then.
Quote:
Originally Posted by Podunk View Post
you are right about sqlx being the successor, I was using that at first, but this is my first time writing sql stuff in plugins so I opted for the much easier to implement dbi class
You'll see the reasons why SQLx is better then DBI in the tut anyway.
Deviance is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 05-05-2007 , 10:09   Re: rememberthefrags SQL Style
Reply With Quote #5

Code:
CREATE TABLE `frags` (
`id` varchar(64) NOT NULL,
`frags` int(10) NOT NULL default '0',
`deaths` int(10) NOT NULL default '0',
`name` varchar(64) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Just add this in your code, along with an IF NOT EXISTS statement to make sure you don't over write it. And yes, use SQLx. The only reason why your plugins is because SQLx provides backwards compatibility. Do not use older standards to create newer plugins.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred

Last edited by Zenith77; 05-05-2007 at 10:12.
Zenith77 is offline
hasta
Senior Member
Join Date: Aug 2004
Location: Ukraine, Kyiv
Old 05-07-2007 , 14:03   Re: rememberthefrags SQL Style
Reply With Quote #6

rememberthefrags by nick, possibly?
hasta is offline
Send a message via ICQ to hasta
Old 05-08-2007, 23:34
bmann_420
This message has been deleted by bmann_420. Reason: add cvar but its sql
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 05-08-2007 , 23:37   Re: rememberthefrags SQL Style
Reply With Quote #7

Oops, but it would be nice if you could use this with sqlite also, for those of us without a database. (I have used jghg's forever now and love it)
__________________
bmann_420 is offline
vvg125
AMX Mod X Beta Tester
Join Date: Dec 2006
Location: Queens (Douglaston), New
Old 05-09-2007 , 04:22   Re: rememberthefrags SQL Style
Reply With Quote #8

Any chance for nVault support on this?

Nice job btw.
__________________
vvg125 is offline
Send a message via AIM to vvg125 Send a message via MSN to vvg125 Send a message via Yahoo to vvg125
Old 05-09-2007, 04:45
Angelina
This message has been deleted by Angelina.
Podunk
Senior Member
Join Date: Nov 2005
Location: Florida
Old 05-09-2007 , 06:50   Re: rememberthefrags SQL Style
Reply With Quote #9

I believe the origonal "rememberthefrags" plugin was designed for the vault db

Deviant, Zenith77, Thanks for the advice.

does SqlX work with sqlite?

Last edited by Podunk; 05-09-2007 at 06:56. Reason: post button happy
Podunk is offline
Send a message via MSN to Podunk
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 05-09-2007 , 07:24   Re: rememberthefrags SQL Style
Reply With Quote #10

Quote:
Originally Posted by Podunk View Post
Deviant
Deviance

Quote:
Originally Posted by Podunk View Post
does SqlX work with sqlite?
According to the tutorial it does.
Deviance 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 17:45.


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