Staff Position wont save
#1

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?
Reply
#2

Under OnPlayerDisconnect do you have it there? so it'll save there player file or anything similar.
Reply
#3

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! .
Reply
#4

sorry i did mistake
delete
pawn Код:
dini_Set(yourfile, "Pos", x, y, z);
and replace
pawn Код:
dini_Set(yourfile, "Pos", Pos);
Reply
#5

It's actually a staff position , Moderator defined as "pModerator"
The script is already done everything is working except this one , it dosent save
Reply
#6

Show us the ode then!:.
Reply
#7

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
Reply
#8

Anyone?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)