Working Around Pickup Bug
#1

Quite a major feature has been added to a script I'm helping to work on, however SA:MP's pickup bug is breaking it.

I'm wondering if anybody has found a proven way to work around the bug and if so, how did you work around it so that you can depend on the pickup id's?
Reply
#2

The easiest method i could imagine (but maybe not the most efficient) would be to store all positions of the pickups, and then, in OnPlayerPickUpPickup compare the players postion with the position of all pickups (maybe with max 1m distance to get an accurate result)

The maximum pickups are 2048, so if you need them all it would take
2048 x 4 x 4 byte = 32768 bytes = 32kb
(3 floats + 1 int (maybe you can make it a bool) to determine if it is a valid, created pickup)

The size should make no big difference if you already got a medium-big script.
Reply
#3

That sounds like it may be what I have to do. I guess the positive is that I'd have an array of pickup info, which I've always sort of wanted
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)