Are SA:MP's pickup id's mess'd up? or is it my fault?
#1

Hello, i run a Dutch RPG server, we have like 10-20 people online everyday.
But there is a problem with our pickup system, i have this in my script:

Код:
WangcarsExitPickup = CreatePickup(1239, 2, -1932.8862,291.5186,445.7198); //Wangcars Inside Exit
AmunationEnterPickup = CreatePickup(1239, 2, 1234.0, 1234.0, 1234.0); // Amunation Outside Enter
We have like 18 pickups like the code above this text.
And we also have this:

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
	if(pickupid == WangcarsExitPickup)
	{
	  GameTextForPlayer(playerid, "~w~Press ~r~/exit ~w~to leave", 5000, 4);
	}
	if(pickupid == AmunationEnterPickup)
	{
	  GameTextForPlayer(playerid, "~r~Amunation~n~~w~Press ~r~/enter ~w~to enter", 5000, 4);
	}
	return 1;
}
So whats the problem:

Somedays, there are totaly no problems, if i enter a pickup, i will get the right pickup-text as it sais on ''OnPlayerPickupPickup''.
Otherdays, All pickup id's are (fucked)mess'd-up, when i enter ''WangcarsExitPickup'' i will get the ''AmunationEnterPickup'' text (or something).

I only use ''CreatePickup'', if i search for ''AddStaticPickup'' nothing will come up, so there is no combination between these kind of pickup's.


Anybody help?

Reply
#2

they are "mess'd" up
Reply
#3

http://forum.sa-mp.com/index.php?top...7633#msg547633
Reply
#4

So... can i download any fix or something?
Reply
#5

Quote:
Originally Posted by WackoX
Hello, i run a Dutch RPG server, we have like 10-20 people online everyday.
But there is a problem with our pickup system, i have this in my script:
make that 0 - 10

http://forum.sa-mp.com/index.php?top...8144#msg548144
Reply
#6

Did i ask you to check how mutch players there are? NO!
thanks for the link btw, someone posted it already but i cant download it for linux
Reply
#7

Quote:
Originally Posted by WackoX
Did i ask you to check how mutch players there are? NO!
thanks for the link btw, someone posted it already but i cant download it for linux
its another post with teh linix linkz0r

http://forum.sa-mp.com/index.php?top...8144#msg548144

and im just saying it
Reply
#8

sa:mp pickup ids arent messed up, they work totally like intented.
to the point, what you can do, though i dont recommend it, a timer and once in a while it removes the pickup and put it right back again.

what i noticed, is the pickup type can be the suspect of those problems aswell.

i always use pickup type 22, which is pickupable icon that do not disappear, thus not gets unused;

well i dont know how it is for other types, i recommend using type's 22 or any other pickupable but not disappearable icon's,,

i use this, and never experienced any problems
Reply
#9

Quote:
Originally Posted by maij
sa:mp pickup ids arent messed up, they work totally like intented.
to the point, what you can do, though i dont recommend it, a timer and once in a while it removes the pickup and put it right back again.

what i noticed, is the pickup type can be the suspect of those problems aswell.

i always use pickup type 22, which is pickupable icon that do not disappear, thus not gets unused;

well i dont know how it is for other types, i recommend using type's 22 or any other pickupable but not disappearable icon's,,

i use this, and never experienced any problems
Quote:
Originally Posted by BeckzyBoi
Reply
#10

To fix DestroyPickup showing different pickups being destroyed for different players, every time you call it, re-create every pickup except for the destroyed one. (It doesn't always work to good though, e.g if a player picks up a pickup with type 2 which is supposed to re spawn after a few seconds, when they pick it up it could immediately destroy by coincidence, or pickup type 3 which isn't supposed to re spawn wouldn't work to good either, so realistically it would only work alright with pickup type 12, which isn't pickup-able).

To fix pickup IDs screwing up in OnPlayerPickupPickup, store every pickup location/id into an array, and find the closest pickup ID to the player when OnPlayerPickupPickup is called to get the real pickup id.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)