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

Previous Maps


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Statistical       
DPT
Member
Join Date: Jun 2011
Old 06-02-2011 , 21:23   Previous Maps
Reply With Quote #1

Author: DPT
Version: 1.0
Date: 3rd of June, 2011

.: Description :.

This plugin saves each played map in an SQL database (tried with MySQL). Upon requests from players through /previousmap and /previousmap_list commands, the plugin will show them which maps were played prior to the current map being played.

In order to avoid unnecessary lag that might happen due to overloaded data in the database, this plugin will delete records (previous map records) that are older than 10 days from the database automatically.


.: Commands :.

/previousmap: Displays the previous map played (before the current one).

/previousmap_list: Displays the last 10 maps played including time of change.


.: CVARS :.

This plugin is ready to go. No CVARS needed.





.: Instructions :.
  1. This plugin will only work with a database. Make sure you fill in the necessary fields in sql.cfg to allow the plugin to connect to your database.
  2. Place PreviousMaps.amxx in your plugins folder and add it to your plugins.ini configuration file.
  3. You're ready to go. The plugin will take care of the rest
.: Updates :.

- 7th of June, 2011: Fixed the tag mismatch warning. Thank you DarkGod for your help.



.: Credits :.

- Hawk552 for his helpful tutorial about SQLx


Any suggestions to improve the plugin are welcomed
Attached Files
File Type: sma Get Plugin or Get Source (PreviousMaps.sma - 1133 views - 4.2 KB)

Last edited by DPT; 07-02-2011 at 22:48.
DPT is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 06-03-2011 , 00:23   Re: Previous Maps
Reply With Quote #2

Nice but already made. Last Maps
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Zombiezzz
Veteran Member
Join Date: Nov 2009
Location: Nov 2009
Old 06-03-2011 , 00:26   Re: Previous Maps
Reply With Quote #3

Quote:
Originally Posted by wickedd View Post
Nice but already made. Last Maps
way to fuck his dreams
__________________
Zombiezzz is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 06-03-2011 , 04:41   Re: Previous Maps
Reply With Quote #4

As long as there is nothing like this in the approvement section it does'nt really matter.
I just don't see the advantage of using mysql here.
__________________
I am out of order!
grimvh2 is offline
DPT
Member
Join Date: Jun 2011
Old 06-03-2011 , 05:29   Re: Previous Maps
Reply With Quote #5

wicked.. I made this plugin because i didn't find anything similar in the approved plugins section.. So if this plugin gets approved, it will be easier for people to find something like this

grimvh2.. I used MySQL for sorting purposes.. easier for me..
DPT is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 06-03-2011 , 07:13   Re: Previous Maps
Reply With Quote #6

hmm ok. Still suggest to add a vault system since this is just a small plugin and most users don't have a mysql db.
__________________
I am out of order!
grimvh2 is offline
DPT
Member
Join Date: Jun 2011
Old 06-04-2011 , 10:04   Re: Previous Maps
Reply With Quote #7

The problem is that im not very familiar with nvault.. anyway i'll try.. thanks for ur suggestion

Last edited by DPT; 06-04-2011 at 10:10.
DPT is offline
alonelive
Senior Member
Join Date: Jan 2011
Location: Big snow country.. :)
Old 06-06-2011 , 11:01   Re: Previous Maps
Reply With Quote #8

//// PreviousMaps.sma
// D:\Advanced\CS-SERVER\HLDS-CS - TEST\cstrike\addons\amxmodx\scripting\Previou sMaps.sma(45 -- 47) : warning 213: tag mismatch
// D:\Advanced\CS-SERVER\HLDS-CS - TEST\cstrike\addons\amxmodx\scripting\Previou sMaps.sma(47) : warning 213: tag mismatch
// D:\Advanced\CS-SERVER\HLDS-CS - TEST\cstrike\addons\amxmodx\scripting\Previou sMaps.sma(51) : error 036: empty statement
// D:\Advanced\CS-SERVER\HLDS-CS - TEST\cstrike\addons\amxmodx\scripting\Previou sMaps.sma(54) : warning 213: tag mismatch
// D:\Advanced\CS-SERVER\HLDS-CS - TEST\cstrike\addons\amxmodx\scripting\Previou sMaps.sma(66) : warning 213: tag mismatch
// D:\Advanced\CS-SERVER\HLDS-CS - TEST\cstrike\addons\amxmodx\scripting\Previou sMaps.sma(129) : warning 213: tag mismatch
// D:\Advanced\CS-SERVER\HLDS-CS - TEST\cstrike\addons\amxmodx\scripting\Previou sMaps.sma(133) : warning 213: tag mismatch
// D:\Advanced\CS-SERVER\HLDS-CS - TEST\cstrike\addons\amxmodx\scripting\Previou sMaps.sma(141) : warning 213: tag mismatch
//
// 1 Error.
// Could not locate output file compiled\PreviousMaps.amx (compile failed).
//
// Compilation Time: 0,09 sec
// ----------------------------------------
alonelive is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 06-06-2011 , 14:13   Re: Previous Maps
Reply With Quote #9

new Handle:SQLConnection
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
DPT
Member
Join Date: Jun 2011
Old 06-06-2011 , 17:59   Re: Previous Maps
Reply With Quote #10

alonealive I'm sorry i didn't understand? In which program were you trying to compile the code?

DarkGod.. whats with that line of code?
DPT 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:07.


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