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?