29.02.2016, 20:51
As soon as I commit any command having 'INI_ParseFile' included in it I get a strange bug, namely; for example: /getip player1, I get the stats of the 'player1' player.
Code:
Whenever restarting the server I get my old stats back.
Code:
PHP Code:
new string[75], pName[MAX_PLAYER_NAME], option[25], user[50], pName2[MAX_PLAYER_NAME], targetplayer;
if(sscanf(params, "s[50]", user)) return SendClientMessage(playerid, COLOR_ORANGE, "Usage: /getip [playername]");
format(string, sizeof string, "/Users/%s.txt", user);
if(!fexist(string)) return SendClientMessage(playerid, COLOR_RED, "Error: The player has not been found in our database!");
INI_ParseFile(string, "LoadPlayerData_user", .bExtra = true, .extra = playerid);
GetPlayerIp(playerid, string, sizeof string);
format(string, sizeof string, "The IP of '%s' is: %s", user, string);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);