SA-MP Forums Archive
Havin a small prob - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Havin a small prob (/showthread.php?tid=186274)



Havin a small prob - Lars_Frederiksen - 28.10.2010

Well it's not that big of a deal, but it's bothering me. I have a dynamic housing system which allows the players to buy a house anywhere on the map. It works great, theres just one little problem, when they buy the house, it's exactly where they were standing, saves in the file and is perfect. But when I log in it sets the house entrance and house car just a little off from where they were when you first bought them.

Код:
HouseX=1341.000000
HouseY=-1675.000000
HouseZ=17.000000
HouseVW=80
HouseIntX=244.000000
HouseIntY=305.000000
HouseIntZ=999.000000
HouseInt=1
HouseCarX=1361.000000
HouseCarY=-1658.000000
HouseCarZ=13.000000
HouseCarAngle=270.0
HouseCarId=549
HouseCarLocked=0
HouseCarColorChosen=0
HouseCarColor1=0
HouseCarColor2=0
HouseLevel=1
HouseSpawn=1
EnterHouse=1
MakingHouse=0
OwnsHouse=1
The problem is it sets the second part of the X, Y and Z to 0's instead of what they should be, is there any way to fix this? Thanks.


Re: Havin a small prob - Hamza' - 28.10.2010

show us the command that sets the second part instead of first one..


Re: Havin a small prob - Lars_Frederiksen - 28.10.2010

Код:
						new Float:pX,Float:pY,Float:pZ;
	   					GetPlayerPos(playerid,pX,pY,pZ);
						new Float:Angle;
						GetPlayerFacingAngle(playerid, Angle);
						HouseInfo[playerid][hHouseX] = Float:pX; HouseInfo[playerid][hHouseY] = Float:pY; HouseInfo[playerid][hHouseZ] = Float:pZ;
						HouseInfo[playerid][hEnterHouse] = 0; HouseInfo[playerid][hMakingHouse] = 1;
						OnBuyHouse(playerid);