View Single Post
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 09-05-2020 , 16:09   Re: Money System [Donate | Give | Take]
Reply With Quote #4

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
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]

Last edited by Shadows Adi; 09-05-2020 at 16:09.
Shadows Adi is offline