11.09.2012, 14:31
It works fine, everything saves, but the file saves at the wrong place.
pleaze, help me with this, fix this if you know that how to fix that?
pleaze, help me with this, fix this if you know that how to fix that?
pawn Код:
GetPlayerName(playerid, pname, sizeof(pname));
format(path, sizeof(path), "/myserver/%s.ini", pname);
format(inputtext, sizeof(inputtext), "/myserver/%s.ini",pname);
if(dialogid == 22225)
{
if(!response)
{
}
else
{
dini_Remove(path);
dini_Create(inputtext);
dini_Set(inputtext,"password",inputtext);
dini_IntSet(inputtext, "moneys", GetPlayerMoney(playerid));
dini_IntSet(inputtext, "adminlevel", pInfo[playerid][pAdminLevel]);
dini_IntSet(inputtext, "hours", pInfo[playerid][phours]);
dini_IntSet(inputtext, "bankid", pInfo[playerid][bankid]);
dini_IntSet(inputtext, "bankregistered", pInfo[playerid][bankregistered] = 0);
dini_IntSet(inputtext, "minutes", pInfo[playerid][pminutes]);
dini_IntSet(inputtext, "rpteacher", pInfo[playerid][rpteacher]);
dini_IntSet(inputtext, "rpmarks", pInfo[playerid][rpmarks]);
dini_IntSet(inputtext, "passport1", pInfo[playerid][passport1]);
dini_IntSet(inputtext, "passport2", pInfo[playerid][passport2]);
dini_IntSet(inputtext, "passport3", pInfo[playerid][passport3]);
dini_IntSet(inputtext, "gps", pInfo[playerid][gps]);
dini_IntSet(inputtext, "job1", pInfo[playerid][job1]);
dini_IntSet(inputtext, "job2", pInfo[playerid][job2]);
dini_IntSet(inputtext, "job3", pInfo[playerid][job3]);
dini_IntSet(inputtext, "nzt", pInfo[playerid][nzt]);
dini_IntSet(inputtext, "cig", pInfo[playerid][cig]);
dini_IntSet(inputtext, "vehiclekeys", pInfo[playerid][vehiclekeys]);
dini_IntSet(inputtext, "cellphone", pInfo[playerid][cellphone]);
dini_IntSet(inputtext, "skin", GetPlayerSkin(playerid));
pInfo[playerid][logged] = 1;
format(string,sizeof(string),"You've successfully changed your name into %s, Change your password again",inputtext);
SendClientMessage(playerid,Yellow,string);
SetPlayerName(playerid,inputtext);
format(file,sizeof(file),"Business/%i.ini",cpid[playerid]);
GetPlayerName(playerid,Name,sizeof(Name));
dini_Set(file, "Owner",inputtext);
format(Label, sizeof(Label), "Business Name: %s\nOwner: %s",dini_Get(file, "Name"),inputtext);
Update3DTextLabelText(BusinessInfo[cpid[playerid]][bLabel],White,Label);
}
}