18.04.2011, 14:30
Hello,
I have this:
But when I go to scriptfiles the file is not there, for example I join as John_Testy and it doesnt create a new .ini file called "John_Testy.ini"
Please help im using yini
I have this:
pawn Код:
if(dialogid == 1) //Register
{
if(response)
{
new name[MAX_PLAYER_NAME], files[256];
GetPlayerName(playerid, name, sizeof(name));
format(files, sizeof(files), "%s.ini", name);
{
new INI:file = INI_Open(files);
gPlayerInfo[playerid][pPassword] = INI_WriteInt(file, "Password", udb_hash(inputtext));
gPlayerInfo[playerid][pLevel] = INI_WriteInt(file, "Level", 1);
SetPlayerScore(playerid,1);
gPlayerInfo[playerid][pMoney] = INI_WriteInt(file, "Money", 5000);
GivePlayerMoney(playerid,5000);
gPlayerInfo[playerid][pHealth] = INI_WriteInt(file, "Health", 100);
SetPlayerHealth(playerid,100);
gPlayerInfo[playerid][pArmour] = INI_WriteInt(file, "Armour", 0);
SetPlayerArmour(playerid,0);
gPlayerInfo[playerid][pSkin] = INI_WriteInt(file, "Skin", 26);
SetPlayerSkin(playerid,26);
INI_Close(file);
gPlayerLogged[playerid] = 1;
return 1;
}
}
}
Please help im using yini