SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 09/08/2008, 08:41 PM   #1
kazimieras
Big Clucker
 
Join Date: Jul 2006
Posts: 63
Reputation: 0
Default [INC] The fix for the epic pickup bug. [Finally]

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:
pawn Code:
#include <pickupfix>
And then, add
pawn Code:
PICKUP_FIX
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!
kazimieras is offline   Reply With Quote
Old 09/08/2008, 09:09 PM   #2
Grove
Huge Clucker
 
Join Date: Jan 2007
Posts: 299
Reputation: 6
Default Re: [INC] The fix for the epic pickup bug. [Finally]

Cool
Grove is offline   Reply With Quote
Old 09/08/2008, 09:17 PM   #3
kazimieras
Big Clucker
 
Join Date: Jul 2006
Posts: 63
Reputation: 0
Default Re: [INC] The fix for the epic pickup bug. [Finally]

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.
kazimieras is offline   Reply With Quote
Old 09/08/2008, 09:22 PM   #4
pspleo
Gangsta
 
Join Date: Nov 2007
Posts: 747
Reputation: 4
Default Re: [INC] The fix for the epic pickup bug. [Finally]

very good, could i suggest? make pickups for vehicles
pspleo is offline   Reply With Quote
Old 09/08/2008, 09:33 PM   #5
tomozj
Little Clucker
 
Join Date: Jan 2007
Posts: 44
Reputation: 7
Default Re: [INC] The fix for the epic pickup bug. [Finally]

.. 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.
tomozj is offline   Reply With Quote
Old 28/08/2008, 08:41 AM   #6
mikster1
Little Clucker
 
Join Date: Apr 2007
Posts: 49
Reputation: 0
Default Re: [INC] The fix for the epic pickup bug. [Finally]

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
mikster1 is offline   Reply With Quote
Old 28/08/2008, 04:56 PM   #7
sebihunter
Huge Clucker
 
Join Date: Nov 2006
Posts: 305
Reputation: 3
Default Re: [INC] The fix for the epic pickup bug. [Finally]

nice, looks great - but I never got the pickup bug in my script
sebihunter is offline   Reply With Quote
Old 29/08/2008, 08:43 AM   #8
mikster1
Little Clucker
 
Join Date: Apr 2007
Posts: 49
Reputation: 0
Default Re: [INC] The fix for the epic pickup bug. [Finally]

Please can someone give me simple instructions and tell me where the line
Code:
PICKUP_FIX
is meant to go and everything.,
Thanks

TM
mikster1 is offline   Reply With Quote
Old 02/09/2008, 12:44 AM   #9
Neoncore
Little Clucker
 
Join Date: May 2008
Posts: 40
Reputation: 0
Default Re: [INC] The fix for the epic pickup bug. [Finally]

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:
pawn Code:
#include <pickupfix>
And then, add
pawn Code:
PICKUP_FIX
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!
Neoncore is offline   Reply With Quote
Old 22/10/2008, 09:34 PM   #10
error55o
Little Clucker
 
Join Date: Oct 2008
Posts: 36
Reputation: 0
Default Re: [INC] The fix for the epic pickup bug. [Finally]

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)
error55o is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finally... but not sure if my server is online. KDlivest954 Server Support 7 21/04/2010 05:35 PM
[FS/GM/Add On] Bus Driver - LV - Version 2-Finally :) GiP_YossI Filterscripts 12 07/02/2010 06:51 PM
Epic. Simply epic. Striker_Moe Everything and Nothing 11 13/12/2009 05:31 PM
ok i think my sites like finally done. shady91 Everything and Nothing 10 21/09/2009 09:55 AM


All times are GMT. The time now is 07:52 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.