View Single Post
xrefresh
SourceMod Donor
Join Date: Apr 2011
Old 10-18-2011 , 22:16   Re: [CS:S] CT Bans
Reply With Quote #7

Having problems with CT bans. Also the offline steam id command doesn't work. In-game on console it says unknown command.

Errors:

Code:
L 10/18/2011 - 19:11:29: SourceMod error session started
L 10/18/2011 - 19:11:29: Info (map "cs_office") (file "errors_20111018.log")
L 10/18/2011 - 19:11:29: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 10/18/2011 - 19:11:29: [SM] Displaying call stack trace for plugin "sm_ctban.smx":
L 10/18/2011 - 19:11:29: [SM]   [0]  Line 201, sm_ctban.sp::OnClientAuthorized()
L 10/18/2011 - 19:11:30: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 10/18/2011 - 19:11:30: [SM] Displaying call stack trace for plugin "sm_ctban.smx":
L 10/18/2011 - 19:11:30: [SM]   [0]  Line 201, sm_ctban.sp::OnClientAuthorized()
L 10/18/2011 - 19:11:30: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 10/18/2011 - 19:11:30: [SM] Displaying call stack trace for plugin "sm_ctban.smx":
L 10/18/2011 - 19:11:30: [SM]   [0]  Line 201, sm_ctban.sp::OnClientAuthorized()
L 10/18/2011 - 19:11:30: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 10/18/2011 - 19:11:30: [SM] Displaying call stack trace for plugin "sm_ctban.smx":
L 10/18/2011 - 19:11:30: [SM]   [0]  Line 201, sm_ctban.sp::OnClientAuthorized()
L 10/18/2011 - 19:11:30: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 10/18/2011 - 19:11:30: [SM] Displaying call stack trace for plugin "sm_ctban.smx":
L 10/18/2011 - 19:11:30: [SM]   [0]  Line 201, sm_ctban.sp::OnClientAuthorized()
L 10/18/2011 - 19:11:30: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 10/18/2011 - 19:11:30: [SM] Displaying call stack trace for plugin "sm_ctban.smx":
L 10/18/2011 - 19:11:30: [SM]   [0]  Line 201, sm_ctban.sp::OnClientAuthorized()
L 10/18/2011 - 19:11:30: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 10/18/2011 - 19:11:30: [SM] Displaying call stack trace for plugin "sm_ctban.smx":
L 10/18/2011 - 19:11:30: [SM]   [0]  Line 201, sm_ctban.sp::OnClientAuthorized()
L 10/18/2011 - 19:11:30: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 10/18/2011 - 19:11:30: [SM] Displaying call stack trace for plugin "sm_ctban.smx":
L 10/18/2011 - 19:11:30: [SM]   [0]  Line 201, sm_ctban.sp::OnClientAuthorized()
L 10/18/2011 - 19:11:30: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 10/18/2011 - 19:11:30: [SM] Displaying call stack trace for plugin "sm_ctban.smx":
L 10/18/2011 - 19:11:30: [SM]   [0]  Line 201, sm_ctban.sp::OnClientAuthorized()
L 10/18/2011 - 19:11:30: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 10/18/2011 - 19:11:30: [SM] Displaying call stack trace for plugin "sm_ctban.smx":
L 10/18/2011 - 19:11:30: [SM]   [0]  Line 201, sm_ctban.sp::OnClientAuthorized()
L 10/18/2011 - 19:11:30: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 10/18/2011 - 19:11:30: [SM] Displaying call stack trace for plugin "sm_ctban.smx":
L 10/18/2011 - 19:11:30: [SM]   [0]  Line 201, sm_ctban.sp::OnClientAuthorized()
L 10/18/2011 - 19:11:30: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 10/18/2011 - 19:11:30: [SM] Displaying call stack trace for plugin "sm_ctban.smx":
L 10/18/2011 - 19:11:30: [SM]   [0]  Line 201, sm_ctban.sp::OnClientAuthorized()
Cvars:

Code:
public OnPluginStart()
{
	CreateConVar("sm_ctban_version", PLUGIN_VERSION, "CT Ban Version", FCVAR_SPONLY|FCVAR_DONTRECORD|FCVAR_REPLICATED|FCVAR_NOTIFY);
	gH_Cvar_Enabled = CreateConVar("sm_ctban_enable","1","Enables CT bans cookie handling", FCVAR_PLUGIN);
	gH_Cvar_SoundName = CreateConVar("sm_ctban_soundfile", "buttons/button11.wav", "The name of the sound to play when an action is denied",FCVAR_PLUGIN);
	gH_Cvar_JoinBanMessage = CreateConVar("sm_ctban_joinbanmsg", "CT banned", "This text is appended to the time the user was last CT banned when they join T or Spectator teams.", FCVAR_PLUGIN);
	gH_Cvar_Table_Prefix = CreateConVar("sm_ctban_table_prefix", "ctban", "Adds a prefix to the CT Bans table, leave this blank unless you have a need to add a prefix for multiple servers on one database.", FCVAR_PLUGIN);
	gH_Cvar_Database_Driver = CreateConVar("sm_ctban_database_driver", "default", "Specifies the configuration driver to use from SourceMod's database.cfg", FCVAR_PLUGIN);
Database:

Code:
"Databases"
{
	"driver_default"		"mysql"
	
	"default"
	{
		"driver"			"mysql"
		"host"				"localhost"
		"database"			"sourcemod"
		"user"				"user"
		"pass"				"blah"
		//"timeout"			"0"
		"port"			"3306"
	}

Last edited by xrefresh; 10-18-2011 at 23:29.
xrefresh is offline