Character System problem... 1
#1

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

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 ); }
Thank you guys in advance.
Reply
#2

pawn Код:
format(var, 32, "NomePersonaggio1=%s\n",PlayerInfo[playerid][pNomePersonaggio1]);fwrite(hFile, var);
%d - integer
%s - string
Reply
#3

Thanks man, I have really forgot that...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)