dini_Int
#7

Quote:
Originally Posted by tanush
Посмотреть сообщение
ok braw you only do this, Make an foldder on scriptfiles called OrgUsers then under onplayerdisconnect
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    GetPlayerName(playerid, Name, sizeof(Name));
    format(file,sizeof(file),"OrgUsers/%s.ini", Name);
    if(dini_Exists(file))
    {
        dini_IntSet(file, "Member", Member[playerid]);
        dini_IntSet(file, "Leader", Leader[playerid]);
        dini_IntSet(file, "Law",Law[playerid]);
        dini_IntSet(file, "Status", IsInOrg[playerid]);
        dini_IntSet(file, "Request", request[playerid]);
        dini_IntSet(file, "IsRequesting", IsRequesting[playerid]);
    }
    return 1;
}
Then when player registers
pawn Код:
dini_Create(file);
Member[playerid] = dini_Int(file, "Member");
Leader[playerid] = dini_Int(file,"Leader");
IsInOrg[playerid] = dini_Int(file,"Status");
IsLaw[playerid] = dini_Int(file,"Law");
request[playerid] = dini_Int(file,"Request");
IsRequesting[playerid] = dini_Int(file,"Isrequesting");
when player loggs in
pawn Код:
Member[playerid] = dini_Int(file, "Member");
Leader[playerid] = dini_Int(file,"Leader");
IsInOrg[playerid] = dini_Int(file,"Status");
IsLaw[playerid] = dini_Int(file,"Law");
request[playerid] = dini_Int(file,"Request");
IsRequesting[playerid] = dini_Int(file,"Isrequesting");
The thing is that i need a register/login to create a unique userfile with pass in forlder OrgUsers in scriptfiles,
And the code in first topic to read from userfile when player connect or disconnect.
or am i wrong?
Reply


Messages In This Thread
dini_Int - by cruising - 03.04.2011, 20:09
Re: dini_Int - by Hashski - 03.04.2011, 20:32
Re: dini_Int - by cruising - 03.04.2011, 20:40
Re: dini_Int - by tanush - 03.04.2011, 20:54
Re: dini_Int - by cruising - 03.04.2011, 21:22
Re: dini_Int - by tanush - 03.04.2011, 21:27
Re: dini_Int - by cruising - 03.04.2011, 21:39

Forum Jump:


Users browsing this thread: 2 Guest(s)