Posts: 10
Threads: 4
Joined: Jul 2015
Reputation:
0
Not working...
Still it continues.
Posts: 10
Threads: 4
Joined: Jul 2015
Reputation:
0
The player login and quit He records his notebook.
Posts: 1,276
Threads: 6
Joined: Aug 2014
Quote:
Originally Posted by AlexandreAymanito
yes
SO we have to write his data when he leave
*So we have to use
1- Check this in the defines
Plase don't Forget this in the Top
PHP код:
#define UserPath "Data/%s.ini"
2-Add this to ur OnPlayerDisconnect
PHP код:
public OnPlayerDisconnect(playerid, reason)
//if(User[playerid][accountLogged] == true) *if u want don't add this
//{ *if u want don't add this
new INI:file = INI_Open(Path(playerid));
INI_SetTag(file,"Player's Data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Cash",pInfo[playerid][Cash]);
INI_WriteInt(File,"Admin",pInfo[playerid][Admin]);
INI_WriteInt(File,"Kills",pInfo[playerid][Kills]);
INI_WriteInt(File,"Deaths",pInfo[playerid][Deaths]);
INI_Close(File);
//} *if u want don't add this
return 1;
}
3-complie
4- Create A file named Data in ur Scriptefiles , in the DAta file u can found the %s.ini (%s=playername) datas
|
//if(User[playerid][accountLogged] == true) *if u want don't add this
//{ *if u want don't add this
You better dam use it, if someone goes to your account, logs off with no variables set it will reset everything.
Posts: 29
Threads: 3
Joined: Jul 2014
Reputation:
0
Bro i mean maybe he don't use
if(User[playerid][accountLogged] == true)
maybe he use anther formule mean if the player logged in