View Single Post
Pawn 3-pg
Senior Member
Join Date: Jul 2009
Old 03-19-2010 , 22:38   Re: [TF2] Locker Overheal
Reply With Quote #8

Quote:
Originally Posted by psychonic View Post
@Pawn 3-pg
It looks like you forgot to tag bPluginEnabled as a bool on line 20 since you use it as one.

Also, it would be wiser to pass userid instead of client index through timers because one user could disconnect and another user connect and get same client index during the duration of the timer.

In addition, some slight optimization tips:
You can use Sourcemod's built-in MaxPlayers constant instead of making a call to the GetMaxPlayers() native.
You can use decl instead of new on your arrays (Strings and vectors) since you populate them with data before doing any other operations with them.
I fixed the bool tag and took your suggestions and updated the plugin.
Pawn 3-pg is offline