03.08.2014, 20:07
Hi all...
I've created a Character System in my server...
Name appears like number in .ini file.
It's all ok, but when you insert your name like "Alan_Hutch" it appears correctly in the dialog, but in the .ini file appears like a number... (I insert Alan_Hutch and it appears 82)
Here's the code
Thank you guys in advance.
I've created a Character System in my server...
Name appears like number in .ini file.
It's all ok, but when you insert your name like "Alan_Hutch" it appears correctly in the dialog, but in the .ini file appears like a number... (I insert Alan_Hutch and it appears 82)
Here's the code
pawn Код:
//under pInfo
pNomePersonaggio1[64],
//in dialogresponse
strcpy(PlayerInfo[playerid][pNomePersonaggio1], inputtext, 64);
OnPlayerSave(playerid);
//OnPlayerConnect
PlayerInfo[playerid][pNomePersonaggio1] = 0;
//OnPlayerRegister
format(var, 32, "NomePersonaggio1=%d\n",PlayerInfo[playerid][pNomePersonaggio1]);fwrite(hFile, var);
//OnPlayerSave
format(var, 32, "NomePersonaggio1=%d\n",PlayerInfo[playerid][pNomePersonaggio1]);fwrite(hFile, var);
//OnPlayerLogin
if( strcmp( key , "NomePersonaggio1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNomePersonaggio1] = strvalEx( val ); }