SA-MP Forums Archive
Bad coordinates - 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: Bad coordinates (/showthread.php?tid=68367)



Bad coordinates - MPKaboose - 09.03.2009

Hi I just noticed that when I use GetPlayerPos(...); the coordinates are like 1234.0000 and not 1234.1234 what can I do to fix it?

Thanks,
ArcticFox


Re: Bad coordinates - MenaceX^ - 09.03.2009

No?


Re: Bad coordinates - MPKaboose - 09.03.2009

Quote:
Originally Posted by MenaceX^
No?
No what?


Re: Bad coordinates - MenaceX^ - 09.03.2009

Show your code.


Re: Bad coordinates - MPKaboose - 09.03.2009

pawn Код:
if(strcmp(cmd, "/savehouse", true) == 0)
    {
      if(PlayerCanSaveHouse[playerid] == 1)
      {
          if (PlayerHouseInfo[PlayerInfo[playerid][Regnumber]][House] == 1)
          {
                DestroyPickup(PlayerHouse[PlayerInfo[playerid][Regnumber]]);
            }
            PlayerHouseInfo[PlayerInfo[playerid][Regnumber]][House] = 1;
            GetPlayerPos(playerid,PlayerHouseInfo[PlayerInfo[playerid][Regnumber]][HouseX],PlayerHouseInfo[PlayerInfo[playerid][Regnumber]][HouseY],PlayerHouseInfo[PlayerInfo[playerid][Regnumber]][HouseZ]);
            CreateStreamPickup(1273,23,PlayerHouseInfo[PlayerInfo[playerid][Regnumber]][HouseX],PlayerHouseInfo[PlayerInfo[playerid][Regnumber]][HouseY],PlayerHouseInfo[PlayerInfo[playerid][Regnumber]][HouseZ],PICKUP_RANGE);
            if (PlayerInfo[playerid][Language] == 0)
            {
                SendClientMessage(playerid,yellow,"Your house has been moved");
            }
            else if (PlayerInfo[playerid][Language] == 1)
            {
                SendClientMessage(playerid,yellow,"A hбzad el van kцltцztetve");
            }
            PlayerCanSaveHouse[playerid] = 0;
        }
        else
        {
            if (PlayerInfo[playerid][Language] == 0)
            {
                SendClientMessage(playerid,red,"Your can't save your house");
            }
            else if (PlayerInfo[playerid][Language] == 1)
            {
                SendClientMessage(playerid,red,"Nem birod le menteni a hбzad");
            }
        }
        return 1;
    }
pawn Код:
GetPlayerPos(playerid,PlayerHouseInfo[PlayerInfo[playerid][Regnumber]][HouseX],PlayerHouseInfo[PlayerInfo[playerid][Regnumber]][HouseY],PlayerHouseInfo[PlayerInfo[playerid][Regnumber]][HouseZ]);



Re: Bad coordinates - MenaceX^ - 09.03.2009

Where is your problem? And try to fix the identitation please.


Re: Bad coordinates - MPKaboose - 09.03.2009

The identitation is only bad here the problem is that GetPlayerPos(...); doesn't get the full coordinate of the player


Re: Bad coordinates - Nubotron - 09.03.2009

Quote:
Originally Posted by ArcticFox
the coordinates are like 1234.0000 and not 1234.1234
How you knwo that?


Re: Bad coordinates - MPKaboose - 09.03.2009

Quote:
Originally Posted by Nubotron
Quote:
Originally Posted by ArcticFox
the coordinates are like 1234.0000 and not 1234.1234
How you knwo that?
Код:
...
House=1
HouseX=-2551.000000
HouseY=2267.000000
HouseZ=5.000000
...
copied from the save file



Re: Bad coordinates - Nubotron - 09.03.2009

Then show how you save those.