Thread
:
Entity Resources Replacement[ V 1.4 ]
View Single Post
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
10-21-2014 , 13:50 Re: Weapons Model Replacement[ OKAPI ]
#
15
Code as it is seems ok.
Though you can always improve a bit:
If
g_arraySize
is empty, you could already destroy the Array and not calling
patchMemory
.
Put some comment about what does the plugin and cvar. Best practice would be an admin doesn't need to check the first post of the plugin thread to know how about what plugin does/how to config/how to insall etc.
I think you should check the string size in plugin and warn about it (meaning ignoring it in case new size > original one + log_amx for example).
Increase buffer for
get_configsdir
; remember that's something that any admin could change in
core.ini
.
32
might a bit short.
I'm not sure to like how you parse the section in your config file. For safety, you should explicitly check for section name. Even better, you don't need section at all, there is no reason to separate like that, you can always do that with comments and in your code, just a matter to check extension for example. Less prone to user's error.
__________________
Last edited by Arkshine; 10-21-2014 at
13:51
.
Arkshine
View Public Profile
Send a private message to Arkshine
Find More Posts by Arkshine