SA-MP Forums Archive
Pickup and label bug? - 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)
+--- Thread: Pickup and label bug? (/showthread.php?tid=570177)



Pickup and label bug? - BleverCastard - 05.04.2015

Before I restored my OS, everything was working fine.
I created a business, it spawned at your position perfectly and the right height(ground).
Now, I was testing it out since I had to manually restore the database, it doesn't spawn it on the ground, it spawns it head-height and also spawns it to the left of you and not on your position(if you stand still and create, it'll spawn on the left-hand side of your player).
Code hasn't been altered at all.

Also, I spoke to Jimmy0wns, who is also having the same issue after updating to 0.3.7.

Can anyone else confirm this?


Re: Pickup and label bug? - Jimmy0wns - 05.04.2015

As said in the thread, I can confirm that whenever I create something regarding coordinates, it seems to put it somewhere else, but sometimes a bit off.


Re: Pickup and label bug? - n0minal - 05.04.2015

Post an example code please, i didn't understood.


Re: Pickup and label bug? - Jimmy0wns - 05.04.2015

Quote:
Originally Posted by ipsLeon
Посмотреть сообщение
Post an example code please, i didn't understood.
Basically whenever you create something based on coordinates (pickup, 3dtext, etc), insert it into a database and reload it again, it puts it at a different coordinate than before.


Re: Pickup and label bug? - MP2 - 06.04.2015

Tested this; cannot confirm. Coordinates are fine. It must be a bug in your script(s).


Re: Pickup and label bug? - Patrik356b - 06.04.2015

I think this is cause your code assumes GetPlayerPos but you were not onfoot, hence the offset. Otherwise i don't know


Re: Pickup and label bug? - n0minal - 06.04.2015

Quote:
Originally Posted by Jimmy0wns
Посмотреть сообщение
Basically whenever you create something based on coordinates (pickup, 3dtext, etc), insert it into a database and reload it again, it puts it at a different coordinate than before.
Its not a bug, your database is probably only rounding the float.


Re: Pickup and label bug? - SchurmanCQC - 06.04.2015

Quote:
Originally Posted by ipsLeon
Посмотреть сообщение
Its not a bug, your database is probably only rounding the float.
This sounds like the correct answer.


Re: Pickup and label bug? - Jimmy0wns - 09.04.2015

Quote:
Originally Posted by ipsLeon
Посмотреть сообщение
Its not a bug, your database is probably only rounding the float.
I didn't think about that before, but it helped; thanks!