View Single Post
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 03-01-2012 , 19:00   Re: [ANY] Map Reporter
Reply With Quote #10

A few things I noticed after a quick look:
  • You escape the players name, but not their input?
  • FastQuery is not threaded, you should probably use TQuery.
  • You should use SQL_CheckConfig before trying to connect.
  • Ideally you could also remove the sql/text cvar and always use SQL. Then fall back to text if SQL_CheckConfig returns false.
  • You could use GetCmdArgString to get the comment, then players would not have to use quotes.
  • It looks like you have a typo (" ms") on line 94.
  • Instead of (GetConVarInt(MySQL_Usage) == 1) you should use (GetConVarBool(MySQL_Usage))


It might also be useful to save the players location when they use the command.
Then it would also be possible to load the reports from the database, stick them in a menu, and allow admins to view, teleport to, and delete reports.


__________________
DarthNinja is offline