24.09.2012, 09:04
pawn Код:
COMMAND:savepos(playerid, params[])
{
new Float:XPos, Float:YPos, Float:ZPos, Float:AnglePos;
GetPlayerPos(playerid, XPos, YPos, ZPos);
GetPlayerFacingAngle(playerid, AnglePos);
PlayerInfo[playerid][PosX] = XPos;
PlayerInfo[playerid][PosY] = YPos;
PlayerInfo[playerid][PosZ] = ZPos;
PlayerInfo[playerid][PosAngle] = AnglePos;
SendClientMessage(playerid, GREEN, "Position saved.");
return 1;
}
EDIT:
pawn Код:
PlayerInfo[playerid][PosX] = XPos; // warning 213: tag mismatch
PlayerInfo[playerid][PosY] = YPos; // warning 213: tag mismatch
PlayerInfo[playerid][PosZ] = ZPos; // warning 213: tag mismatch
PlayerInfo[playerid][PosAngle] = AnglePos; // warning 213: tag mismatch