View Single Post
LumiStance
AlliedModders Donor
Join Date: Jan 2009
Location: Northern California
Old 09-29-2012 , 22:02   Re: [CSS] Ammo Replenishment Lite - Refill on kill and Restock when out
Reply With Quote #15

Quote:
Originally Posted by Peace-Maker View Post
You really shouldn't "over optimize" your plugins until you can't read it fluently anymore.

PHP Code:
if (gun==0x30316D78)                            // xm1014
    
g_PlayerPrimaryAmmo[client_index]=7
A string comparison wouldn't hurt in such a non-time critical function. It's not like it's executed every gameframe ;)

+ Do you really need to force that advertisement on join? Imagine every plugin would do that..

Nice plugin!
Thanks for the suggestions. My main motivation for keeping it is as a reference for others when they have a true need. Wish there was a cleaner way to have pawn do a 32 bit integer compare on strings.

Actually, I hate it when plugins don't announce themselves, nor set a version cvar. I suppose they like to be 1337 and unknown.
__________________

Last edited by LumiStance; 09-29-2012 at 22:02.
LumiStance is offline