06.03.2017, 01:35
Maybe you should get the player name before formatting the path.
your PATH define should be something like "users/%s.ini" , then you're trying to insert an integer in that %s, which is not going to happen.
Get the player's name before formatting:
EDIT: Unless you want to use that command with offline players aswell, if that's the case, make name a string
and replace the 'u' for the string in sscanf.
And leave everything else as it is
your PATH define should be something like "users/%s.ini" , then you're trying to insert an integer in that %s, which is not going to happen.
Get the player's name before formatting:
Код:
new playname[24]; GetPlayerName(name,playname,sizeof playname); format(file, 100, PATH, playname);
Код:
Name[24];
Код:
if(sscanf(params, "s[24]s[50]", Name, reason)) return SendClientMessage(playerid, error, "Usage: /obanacc <Player Name> <Reason>");