Some optimization:
1.
Code:
client_print(id, print_console
-->>
console_print()
Code:
sizeof() -1 ???
->>
charsmax()
Code:
format(filename, sizeof(filename) - 1, "%s/MoneySystem_%s.log", dir, filename);
-->>
static log_file[64];
formatex(log_file, charsmax(log_file), "%s/MoneySystem_%s.log", dir, filename); /* Much faster than what format() can do */
log_to_file(log_file, "%s", message);
stock ChatColor /* ???? client_print_color() */
And you can get the name of player in a global var ( or a hash map ). When he's connecting you retrive his name and use it instead of this:
Code:
get_user_name( id, ... )
get_user_name( iTarget, ... )
Same thing with the steamid
__________________