03.04.2011, 20:09
Hello!
The filterscrip doesnt save player info to any file (witch it should do to a dini_Int file i guess)
Any ideas whats wrong? do i need a register/login to make it work?
I have a map in scriptfiles named "OrgUsers" and there is also no file created there
Here is the saving part
And
The filterscrip doesnt save player info to any file (witch it should do to a dini_Int file i guess)
Any ideas whats wrong? do i need a register/login to make it work?
I have a map in scriptfiles named "OrgUsers" and there is also no file created there
Here is the saving part
pawn Код:
public OnPlayerConnect(playerid)
{
GetPlayerName(playerid, Name, sizeof(Name));
format(file,sizeof(file),"OrgUsers/%s.ini", Name);
if(dini_Exists(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");
}
return 1;
}
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, "Status", IsInOrg[playerid]);
dini_IntSet(file, "Request", request[playerid]);
dini_IntSet(file, "IsRequesting", IsRequesting[playerid]);
}
return 1;
}
pawn Код:
forward Save(playerid);
public Save(playerid)
{
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), "OrgUsers/%s",pname);
if(dini_Exists(file))
{
dini_Create(file);
dini_IntSet(file, "Member", Member[playerid]);
dini_IntSet(file, "Leader", Leader[playerid]);
dini_IntSet(file, "Status", IsInOrg[playerid]);
dini_IntSet(file, "Law", IsLaw[playerid]);
dini_IntSet(file, "Gang", IsGang[playerid]);
dini_IntSet(file, "Priv", IsPriv[playerid]);
dini_IntSet(file, "Request", request[playerid]);
dini_IntSet(file, "IsRequesting", IsRequesting[playerid]);
}
return 1;
}