23.07.2016, 17:08
His code looks better than yours, tbh. It's easier to read through.
O.T.: a player's name can have a maximum length of 24. Giving the variable a size of 25 and higher is unnecessary. Have you tested the code with a second player instead of on yourself?
EDIT: if it works on someone else, then you should update your sscanf include (to sscanf2 or a newer version of sscanf2). You could also use the 'r' specifier instead of 'u', if you're not planning on using the command on NPCs.
O.T.: a player's name can have a maximum length of 24. Giving the variable a size of 25 and higher is unnecessary. Have you tested the code with a second player instead of on yourself?
EDIT: if it works on someone else, then you should update your sscanf include (to sscanf2 or a newer version of sscanf2). You could also use the 'r' specifier instead of 'u', if you're not planning on using the command on NPCs.