Quote:
Originally Posted by AmigaBlizzard
Why would my approach be terrible?
It works for me.
Btw, the default samp includes are managed in a similar way.
Defines and generic functions in one include (a_samp.inc), object functions in another (a_objects.inc), player functions in a third include (a_players.inc), vehicle functions in a 4th include (a_vehicles.inc), SQL functions in a 5th include (a_sampdb.inc) and so on.
|
Yes, it works for you, but is a terrible habit that you
shouldn't promote, well you like it? great, you like using dini and main callback+strcmp for CMDs? great, and it
works. doesn't mean it's the proper or best approach.
Say I was to change a variable in vehicle enum from Health to vHealth for more clarity, how many files should I change in your approach? 9.. 19... 900, how can I do that in a proper approach? a simple find and replace in one file, even more properly with a regex to find VehI[ - ][Health] if Health is used on other enums too.
No, sa-mp isn't managed in "the same way"
it's managed in the proper way, as in it's
categorized their code based on their function, because sa-mp is only providing tools, you see it as "divided by functions" or whatsoever.
Apply the same to the logic, and you'd be having everything about the vehicle in one include, everything about houses in another and so on.