18.03.2015, 12:42
quand il se connecte
quand il se dйconnecte
voila les codes
Code:
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); if(fexist(Path(playerid))) { INI_ParseFile(Path(playerid),"loadaccount_%s", .bExtra = true, .extra = playerid); ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT,"Connexion","{FFFFFF}Bienvenue ! Ce compte {008000}est enregistrй. \n{FFFFFF}Insйrez votre mot de passe pour vous connecter а votre compte !","Connexion","Quitter"); } else { ShowPlayerDialog(playerid,dregister,DIALOG_STYLE_INPUT,"Inscription","{FFFFFF}Bienvenue ! Ce compte {FF0000}n'est pas enregistrй.\n{FFFFFF}Entrez un mot de passe pour vous crйer un compte.","Inscription","Quitter"); return 1; }
Code:
new INI:file = INI_Open(Path(playerid)); INI_SetTag(file,"Player's Data"); INI_WriteInt(file,"AdminLevel",pInfo[playerid][Adminlevel]); INI_WriteInt(file,"VIPLevel",pInfo[playerid][VIPlevel]); INI_WriteInt(file,"Money",GetPlayerMoney(playerid)); INI_WriteInt(file,"Scores",GetPlayerScore(playerid)); INI_WriteInt(file,"Kills",pInfo[playerid][Kills]); INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]); INI_Close(file);