[INC] The fix for the epic pickup bug. [Finally] -
kazimieras - 09.08.2008
Hey, I dunno about you, but I was really p*ssed off with the pickup bug SA:MP has. With it, pickup id's were not the same for all players, and that sucks. Today, I have thought of a script to work it around and I'm willing to share. This is an include, but since it's really small, I'll just post the code on pastebin and won't upload the file. So, let's go.
First, make a new include named pickupfix.inc in your includes folder.
Secondly, paste the code from the link in it:
http://pastebin.com/f37dd849f
Then add this on top of your script:
And then, add
On OnPlayerPickupPickup callback like this:
pawn Code:
public OnPlayerPickUpPickup(playerid, pickupid)
{
FIX_PICKUPS
Now that you have done it, there will be no more pickupid messups! Isn't that great?
I made this myself, but I use some Andre's functions, so I gave him credits. Thank you for reading, and goodbye!
Re: [INC] The fix for the epic pickup bug. [Finally] -
Grove - 09.08.2008
Cool
Re: [INC] The fix for the epic pickup bug. [Finally] -
kazimieras - 09.08.2008
Pickup positions are written down into an array, and then player position is used to judge wether the player has picked up the pickup of his pickupid or not. If not, the system automaticly finds a pickup closest to the player and assigns it to be the "pickupid". Sry for bad english, but I hope you understood.
Re: [INC] The fix for the epic pickup bug. [Finally] -
pspleo - 09.08.2008
very good, could i suggest? make pickups for vehicles
Re: [INC] The fix for the epic pickup bug. [Finally] -
tomozj - 09.08.2008
.. That's not what this script deals with. This script fixes a bug in which pickup ids were not always correct, nothing to do with vehicles. You can make pickups for vehicles, just look up the different pickup types.
Re: [INC] The fix for the epic pickup bug. [Finally] -
mikster1 - 28.08.2008
PICKUP_FIX
where would i add that?
i have used this but it doesnt seem to fix my problem of two different pickups showing the same menu when they are meant to show different :S
TM
Re: [INC] The fix for the epic pickup bug. [Finally] -
sebihunter - 28.08.2008
nice, looks great - but I never got the pickup bug in my script
Re: [INC] The fix for the epic pickup bug. [Finally] -
mikster1 - 29.08.2008
Please can someone give me simple instructions and tell me where the line
is meant to go and everything.,
Thanks
TM
Re: [INC] The fix for the epic pickup bug. [Finally] -
Neoncore - 02.09.2008
Quote:
Originally Posted by KANiS6111
Hey, I dunno about you, but I was really p*ssed off with the pickup bug SA:MP has. With it, pickup id's were not the same for all players, and that sucks. Today, I have thought of a script to work it around and I'm willing to share. This is an include, but since it's really small, I'll just post the code on pastebin and won't upload the file. So, let's go.
First, make a new include named pickupfix.inc in your includes folder.
Secondly, paste the code from the link in it: http://pastebin.com/f37dd849f
Then add this on top of your script: And then, add On OnPlayerPickupPickup callback like this:
pawn Code:
[b]public OnPlayerPickUpPickup(playerid, pickupid) { FIX_PICKUPS[/b]
Now that you have done it, there will be no more pickupid messups! Isn't that great?
I made this myself, but I use some Andre's functions, so I gave him credits. Thank you for reading, and goodbye!
|
Re: [INC] The fix for the epic pickup bug. [Finally] -
error55o - 22.10.2008
so this wont fix the 14 bug not being called coz your in a car or truck and so on? (14 is the vehicle pickup number)
Re: [INC] The fix for the epic pickup bug. [Finally] -
error55o - 24.10.2008
Quote:
Originally Posted by Seif_
Quote:
Originally Posted by error55o
so this wont fix the 14 bug not being called coz your in a car or truck and so on? (14 is the vehicle pickup number)
|
You can just create the timer and run a loop to check if the player is in a vehicle and near the pickup.
|
lol I'm a scripting n00b, I have tried a few times, unsuccessfully
Re: [INC] The fix for the epic pickup bug. [Finally] -
beckzy - 25.10.2008
It doesn't stop pickup ids being different for different players... I have always used this method to get around it for OnPlayerPickUpPickup but it doesn't stop DestroyPickup destroying different pickups for different players!
You might want to change the title of the topic because I looked at it genuinely thinking that it was a fix, when it is actually just a piece of code that prevents something the bug can cause
.
Re: [INC] The fix for the epic pickup bug. [Finally] -
kazimieras - 03.11.2008
Well... you can add functions yourself
Re: [INC] The fix for the epic pickup bug. [Finally] -
Reamis - 03.11.2008
nice KANiS
Re: [INC] The fix for the epic pickup bug. [Finally] -
Tornado - 03.11.2008
Quote:
Originally Posted by KANiS6111
Hey, I dunno about you, but I was really p*ssed off with the pickup bug SA:MP has. With it, pickup id's were not the same for all players, and that sucks. Today, I have thought of a script to work it around and I'm willing to share. This is an include, but since it's really small, I'll just post the code on pastebin and won't upload the file. So, let's go.
First, make a new include named pickupfix.inc in your includes folder.
Secondly, paste the code from the link in it: http://pastebin.com/f37dd849f
Then add this on top of your script: And then, add On OnPlayerPickupPickup callback like this:
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid) { FIX_PICKUPS
Now that you have done it, there will be no more pickupid messups! Isn't that great?
I made this myself, but I use some Andre's functions, so I gave him credits. Thank you for reading, and goodbye!
|
Why do you say to add PICKUP_FIX onto the OnPlayerPickUpPickup, and then in example we see FIX_PICKUPS ??
Re: [INC] The fix for the epic pickup bug. [Finally] -
x-cutter - 31.12.2008
Quote:
Originally Posted by Sebihunter
nice, looks great - but I never got the pickup bug in my script
|
Only happens on Linux
Re: [INC] The fix for the epic pickup bug. [Finally] -
ғαιιοцт - 22.01.2009
this include isn't really working for me
Re: [INC] The fix for the epic pickup bug. [Finally] -
ғαιιοцт - 24.01.2009
oh sorry, i edited the range of 5.0 to 1.0 and now it works Much better
tip: please don't search for a pickup in a range of 5.0 from the player,
but search for the Closest pickup in a range of 5.0 from the player.
this is why it didn't work.. when my moneypickup was 5.0 away from the other pickup, he gives the other pickup while i took the money pickup
please update this to a next version
Re: [INC] The fix for the epic pickup bug. [Finally] -
Dark_BasS - 24.01.2009
I'm FREE HOSTER!!!
XD
Re: [INC] The fix for the epic pickup bug. [Finally] -
TrueCoppa - 24.01.2009
Quote:
Originally Posted by Dark_BasS
I'm FREE HOSTER!!! XD
|
wtf... Spam Much?