Staff Position wont save -
Oldyman - 22.11.2014
I did script a new staff position like , it works and everything fine
but when a player relogs , the staff position dosent save
what can i do in this case?
Re: Staff Position wont save -
James Bob - 22.11.2014
Under OnPlayerDisconnect do you have it there? so it'll save there player file or anything similar.
Re: Staff Position wont save -
UltraScripter - 22.11.2014
The Save :
pawn Код:
new Pos[20];
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
format(Pos, sizeof(Pos), "=", x, y, z);
dini_Set(yourfile, "Pos", x, y, z);
OnPlayerSpawn
pawn Код:
new pPos;
pPos = dini_Int(yourfile, "=");
SetPlayerPos(playerid, pPos);
Hope That Helped!
.
Re: Staff Position wont save -
UltraScripter - 22.11.2014
sorry i did mistake
delete
pawn Код:
dini_Set(yourfile, "Pos", x, y, z);
and replace
pawn Код:
dini_Set(yourfile, "Pos", Pos);
Re: Staff Position wont save -
Oldyman - 22.11.2014
It's actually a staff position , Moderator defined as "pModerator"
The script is already done everything is working except this one , it dosent save
Re: Staff Position wont save -
UltraScripter - 22.11.2014
Show us the ode then!:.
Re: Staff Position wont save -
Oldyman - 02.12.2014
i did the following but still the same:
Код:
stock SaveChar(playerid)
{
if(IsPlayerConnected(playerid))
{
dini_IntSet(file, "Moderator", PlayerInfo[playerid][pModerator]);
}
}
stock LoadChar(playerid)
{
PlayerInfo[playerid][pModerator] = dini_Int(file, "Moderator");
}
Lemme give you more details , somehow im just trying to develop my own gamemode so this staff position would save in the user file "scriptfiles/users/user.ini" , somehow it dosent save everything is correct and its commands are working but when u relog it dosent save
Assigning + /q = coming back without the position
Re: Staff Position wont save -
Oldyman - 06.12.2014
Anyone?