20.03.2011, 20:46
I looked at forum for help to position save when player disconnect but i cant find any that works
. Can you guys help me with dini position save please
!
![Sad](images/smilies/sad.gif)
![Grin](images/smilies/biggrin.gif)
dini_FloatSet(file,value,Float);
dini_IntSet(file,"Position", 0);
SetPlayerPos(playerid, dini_Int(file, "Position"));
new Float:X, Float:Y, Float:Z;
dini_IntSet(file,"Position",GetPlayerPos(X, Y, Z));
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(802) : warning 213: tag mismatch
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(802) : warning 202: number of arguments does not match definition
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(810) : warning 202: number of arguments does not match definition
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(810) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Warnings.
dini_IntSet(file,"Position",GetPlayerPos(X, Y, Z));
SetPlayerPos(playerid, dini_Int(file, "Position"));
SetPlayerPos(playerid, dini_Int(file, "PosX"), dini_Int(file, "PosY"), dini_Int(file, "PosX"));
GetPlayerPos(playerid, X, Y, Z);
dini_IntSet(file,"PosX",X);
dini_IntSet(file,"PosY",Y);
dini_IntSet(file,"PosZ",Z);
enum pInfo
{
Float:pPosX,
Float:pPosY,
Float:pPosZ,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
dini_FloatSet(string, "PosX", PlayerInfo[playerid][pPosX]);
dini_FloatSet(string, "PosY", PlayerInfo[playerid][pPosY]);
dini_FloatSet(string, "PosZ", PlayerInfo[playerid][pPosZ]);
PlayerInfo[playerid][pPosX] = dini_Float(string2,"PosX");
PlayerInfo[playerid][pPosY] = dini_Float(string2,"PosY");
PlayerInfo[playerid][pPosZ] = dini_Float(string2,"PosZ");
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
PlayerInfo[playerid][pPosX] = x;
PlayerInfo[playerid][pPosY] = y;
PlayerInfo[playerid][pPosZ] = z;
SetPlayerPos(playerid,PlayerInfo[playerid][pPosX],PlayerInfo[playerid][pPosY],PlayerInfo[playerid][pPosZ]);