Commits

DarthNinja  committed 39d2913 Draft

Sleeping Dogs items

  • Participants
  • Parent commits 64ee78e

Comments (0)

Files changed (3)

File plugin/tf/addons/sourcemod/plugins/TF2_Stats.smx

Binary file modified.

File plugin/tf/addons/sourcemod/scripting/TF2_Stats.sp

 #undef REQUIRE_PLUGIN
 #include <autoupdate>
 
-#define PLUGIN_VERSION "9.0.0"
-#define DBVERSION 36
+#define PLUGIN_VERSION "9.1.0"
+#define DBVERSION 37
 
 #define MAX_LINE_WIDTH 60
 
 */
 
 
+
+
+//Sleeping Dogs
+//-------------------
+new Handle:long_heatmaker = INVALID_HANDLE;
+new Handle:annihilator = INVALID_HANDLE;
+new Handle:recorder = INVALID_HANDLE;
+new Handle:guillotine = INVALID_HANDLE;
+
+
+
+
+
 //All-Class Weapons
 //-------------------
 new Handle:Objector_Points = INVALID_HANDLE;
 	len += Format(query[len], sizeof(query)-len, "`armageddon` int(11) NOT NULL default '0',");
 	len += Format(query[len], sizeof(query)-len, "`pro_rifle` int(11) NOT NULL default '0',");
 	len += Format(query[len], sizeof(query)-len, "`pro_smg` int(11) NOT NULL default '0',");
+	
+	len += Format(query[len], sizeof(query)-len, "`long_heatmaker` int(11) NOT NULL default '0',");
+	len += Format(query[len], sizeof(query)-len, "`annihilator` int(11) NOT NULL default '0',");
+	len += Format(query[len], sizeof(query)-len, "`guillotine` int(11) NOT NULL default '0',");
+	len += Format(query[len], sizeof(query)-len, "`recorder` int(11) NOT NULL default '0',");
 	len += Format(query[len], sizeof(query)-len, "PRIMARY KEY  (`STEAMID`)");
 	len += Format(query[len], sizeof(query)-len, ") ENGINE=MyISAM DEFAULT CHARSET=utf8;");
 	SQL_FastQuery(db, query);
 	len += Format(query[len], sizeof(query)-len, ", `armageddon` INTEGER DEFAULT 0");
 	len += Format(query[len], sizeof(query)-len, ", `pro_rifle` INTEGER DEFAULT 0");
 	len += Format(query[len], sizeof(query)-len, ", `pro_smg` INTEGER DEFAULT 0");
+	
+	len += Format(query[len], sizeof(query)-len, ", `long_heatmaker` INTEGER DEFAULT 0");
+	len += Format(query[len], sizeof(query)-len, ", `annihilator` INTEGER DEFAULT 0");
+	len += Format(query[len], sizeof(query)-len, ", `guillotine` INTEGER DEFAULT 0");
+	len += Format(query[len], sizeof(query)-len, ", `recorder` INTEGER DEFAULT 0");
 	len += Format(query[len], sizeof(query)-len, ");");
 	SQL_FastQuery(db, query);
 }
 	Sharp_Dresser_Points = CreateConVar("rank_sharp_dresser_points","4","Points:Spy - The Sharp Dresser");
 	Spy_Cicle_Points = CreateConVar("rank_spy_cicle_points","4","Points:Spy - The Spy-cicle");
 	BlackRose_Points = CreateConVar("rank_blackrose_points","4","Points:Spy - The Black Rose");
+	
+	// Sleeping Dogs Items
+	long_heatmaker = CreateConVar("rank_long_heatmaker_points","1","Points:Heavy - The Huo-Long Heater");
+	annihilator = CreateConVar("rank_annihilator_points","3","Points:Pyro - The Neon Annihilator");
+	guillotine = CreateConVar("rank_guillotine_points","4","Points:Scout - The Flying Guillotine");
+	recorder = CreateConVar("rank_recorder_points","1","Points:Spy - The Red-Tape Recorder");
 
 
 	//Events
 							SQL_TQuery(db,SQLErrorCheckCallback, query);
 						}
 					}
+					//----------------------------Sleeping Dogs Promo Update---------------------------------
+					else if (strcmp(weapon[0], "long_heatmaker", false) == 0)
+					{
+						pointvalue = GetConVarInt(long_heatmaker)
+						Format(query, sizeof(query), "UPDATE Player SET POINTS = POINTS + %i, KILLS = KILLS + 1, long_heatmaker = long_heatmaker + 1 WHERE STEAMID = '%s'",pointvalue ,steamIdattacker);
+						if (nofakekill == true && isbot == false)
+						{
+							SQL_TQuery(db,SQLErrorCheckCallback, query);
+						}
+					}
+					else if (strcmp(weapon[0], "annihilator", false) == 0)
+					{
+						pointvalue = GetConVarInt(annihilator)
+						Format(query, sizeof(query), "UPDATE Player SET POINTS = POINTS + %i, KILLS = KILLS + 1, annihilator = annihilator + 1 WHERE STEAMID = '%s'",pointvalue ,steamIdattacker);
+						if (nofakekill == true && isbot == false)
+						{
+							SQL_TQuery(db,SQLErrorCheckCallback, query);
+						}
+					}
+					else if (strcmp(weapon[0], "guillotine", false) == 0)
+					{
+						pointvalue = GetConVarInt(guillotine)
+						Format(query, sizeof(query), "UPDATE Player SET POINTS = POINTS + %i, KILLS = KILLS + 1, guillotine = guillotine + 1 WHERE STEAMID = '%s'",pointvalue ,steamIdattacker);
+						if (nofakekill == true && isbot == false)
+						{
+							SQL_TQuery(db,SQLErrorCheckCallback, query);
+						}
+					}
+					else if (strcmp(weapon[0], "recorder", false) == 0)
+					{
+						pointvalue = GetConVarInt(recorder)
+						Format(query, sizeof(query), "UPDATE Player SET POINTS = POINTS + %i, KILLS = KILLS + 1, recorder = recorder + 1 WHERE STEAMID = '%s'",pointvalue ,steamIdattacker);
+						if (nofakekill == true && isbot == false)
+						{
+							SQL_TQuery(db,SQLErrorCheckCallback, query);
+						}
+					}
+					//----------------------------Sleeping Dogs Promo Update---------------------------------
 					//----------------------------Assassin's Creed Promo Update---------------------------------
 					else if (strcmp(weapon[0], "sharp_dresser", false) == 0)
 					{
 			else
 			{
 				//Set default sqlite values >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>VVVVVVV<<<<<<<<<<<<<<<<<<
-				Format(buffer, sizeof(buffer), "INSERT INTO Player VALUES('%s','%s',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);", ClientSteamID,clientname )
+				Format(buffer, sizeof(buffer), "INSERT INTO Player VALUES('%s','%s',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);", ClientSteamID,clientname )
 				SQL_TQuery(db, SQLErrorCheckCallback, buffer);
 			}
 			if (GetConVarInt(showrankonconnect) != 0)
 					SQL_TQuery(db,SQLErrorCheckCallback, buffer);
 				}
 			}
+			
+			if (tmpdbversion <= 36)
+			{
+				if (!sqllite)
+				{
+					new String:buffer[255];
+					new len = 0;
+					decl String:query[1000];
+					len += Format(query[len], sizeof(query)-len, "ALTER TABLE `Player` ADD `long_heatmaker` INT NOT NULL DEFAULT '0',");
+					len += Format(query[len], sizeof(query)-len, "ADD `annihilator` INT NOT NULL DEFAULT '0',");
+					len += Format(query[len], sizeof(query)-len, "ADD `guillotine` INT NOT NULL DEFAULT '0',");
+					len += Format(query[len], sizeof(query)-len, "ADD `recorder` INT NOT NULL DEFAULT '0';");
+					SQL_TQuery(db, SQLErrorCheckCallback, query);
+
+					Format(buffer, sizeof(buffer), "UPDATE data SET dataint = 37 where `name` = 'dbversion'");
+					SQL_TQuery(db,SQLErrorCheckCallback, buffer);
+				}
+				else
+				{
+					new String:buffer[600];
+					Format(buffer, sizeof(buffer), "ALTER table Player add long_heatmaker INTEGER DEFAULT 0 ;")
+					SQL_TQuery(db, SQLErrorCheckCallback, buffer);
+					Format(buffer, sizeof(buffer), "ALTER table Player add annihilator INTEGER DEFAULT 0 ;")
+					SQL_TQuery(db, SQLErrorCheckCallback, buffer);
+					Format(buffer, sizeof(buffer), "ALTER table Player add guillotine INTEGER DEFAULT 0 ;")
+					SQL_TQuery(db, SQLErrorCheckCallback, buffer);
+					Format(buffer, sizeof(buffer), "ALTER table Player add recorder INTEGER DEFAULT 0 ;")
+					SQL_TQuery(db, SQLErrorCheckCallback, buffer);
+
+					Format(buffer, sizeof(buffer), "UPDATE data SET dataint = 37 where `name` = 'dbversion';");
+					SQL_TQuery(db,SQLErrorCheckCallback, buffer);
+				}
+			}
 
 			//---------
 

File plugin/tf/cfg/tf2-stats.cfg

 rank_wrapassassin_points					"6"		//The Wrap Assassin
 rank_brawlerblaster_points					"3"		//Baby Face's Blaster
 rank_pbpp_points								"3"		//Pretty Boy's Pocket Pistol
+rank_guillotine_points						"4"		//The Flying Guillotine
 
 
 //-----------------|
 rank_phlogistinator_points					"2"		//The Phlogistinator
 rank_manmelter_points						"3"		//The Manmelter
 rank_thirddegree_points					"5"		//The Third Degree
-
 rank_rainblower_points						"3"		//Rainblower
 rank_scorchedshot_points					"5"		//scorchedshot
 rank_Lollichop_points						"4"		//Lollichop
 rank_armageddon_points					"15"		//Armageddon taunt
-
+rank_annihilator_points						"3"		//The Neon Annihilator
 
 
 //-----------------|
 rank_eviction_notice_points					"4"		//The Eviction Notice
 rank_holiday_punch_points					"4"		//The Holiday Punch
 rank_apocofist_points							"4"		//The Apocofists
-
+rank_long_heatmaker_points					"1"		//The Huo-Long Heater
 
 
 //-----------------|
 rank_shahanshah_points					"5"		//The Shahanshah
 rank_machina_points						"2"		//The Machina
 rank_machina_doublekill_points			"5"		//The Machina (Double Kill)
-
 rank_hitmansheatmaker_points			"1"		//Hitman's Heatmaker
 rank_cleanerscarbine_points				"2"		//Cleaner's Carbine
 
 rank_sharp_dresser_points					"4"		//The Sharp Dresser
 rank_spy_cicle_points						"4"		//The Spy-cicle
 rank_blackrose_points						"4"		//The Black Rose
-
+rank_recorder_points						"1"		//The Red-Tape Recorder
 
 
 //-----------------|