03.03.2018, 13:40
FIXED!
Sharing what i did to fix:
Let me start off thanking PepsiCola for his idea because it helped to save the data but not to load it.
so what i did, is i put this under public OnPlayerConnect(playerid) callback so when player's name is already exists in the database his/her data will be loaded, but if he/she is new, it wouldn't do anything..
Sharing what i did to fix:
Let me start off thanking PepsiCola for his idea because it helped to save the data but not to load it.
so what i did, is i put this under public OnPlayerConnect(playerid) callback so when player's name is already exists in the database his/her data will be loaded, but if he/she is new, it wouldn't do anything..
PHP код:
public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
SendClientMessage(playerid, -1, "Welcome back");
}
else
{
SendClientMessage(playerid, -1, "welcome it's ur first time");
}
return 1;
}