View Single Post
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-05-2020 , 16:53   Re: Money System [Donate | Give | Take]
Reply With Quote #5

Quote:
Originally Posted by Shadows Adi View Post
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
Thx i understand you, But client_print_color() working only for amxmodx 1.8.3 so i can't use it because i want my plugin working on all versions and thanks and again i will edit all that when i add new updates

Last edited by Supremache; 09-05-2020 at 17:11.
Supremache is offline