22.10.2012, 18:59
Try this:
Replace yours with that one and see.
This format(file,sizeof(file),"nAdmin/Users/%s.ini",targetid); is the big mistake, why?
It's because your saying that %s = targetid which is a number and we want to save it in his user file(which is written by his name not his ID), get it?
PHP код:
new tarname[MAX_PLAYER_NAME];
GetPlayerName(targetid,tarname,sizeof(tarname));
GetPlayerName(playerid, tname, sizeof(tname));
format(file,sizeof(file),"nAdmin/Users/%s.ini",tarname);
This format(file,sizeof(file),"nAdmin/Users/%s.ini",targetid); is the big mistake, why?
It's because your saying that %s = targetid which is a number and we want to save it in his user file(which is written by his name not his ID), get it?