[BUG] Pickups
#1

I am pretty sure this is a samp bug,
sometimes pickups are really messed up (OnPlayerPickupPickup)

For example money rush didnt even start, then i go to a store in a pickup to buy food, but sometimes when i enter the food checkpoint i get the money bag

i checked the code and everything is alright
Reply
#2

you need check count of them, in one time you can create 4096 pickups
if you use streamer:

Код:
new st[256];
format(st,sizeof(st),"Number of pickups: %d",Streamer_CountVisibleItems(playerid,1));
SendClientMessage(playerid,-1,st);
Are you sure it's 0.3e bug?
Reply
#3

It's likely your code.
Reply
#4

Hey I'm pretty sure its a SA-MP bug, no need to paste my OnPlayerPickUpPickup code here.

n1
Reply
#5

Quote:
Originally Posted by FufLa
Посмотреть сообщение
Hey I'm pretty sure its a SA-MP bug, no need to paste my OnPlayerPickUpPickup code here.

n1
pawn Код:
if(pickupid == MoneyBagPickup)
    {
        new string[180], pname[24], money = MoneyBagCash;
        GetPlayerName(playerid, pname, 24);
        format(string, sizeof(string), "%s hat den verlorenen Geldsack mit %dЂ drinnen bei %s gefunden.", pname, money, MoneyBagLocation);
        MoneyBagFound = 1;
        SendClientMessageToAll(COLOR_DARKORANGE, string);
        DestroyPickup(MoneyBagPickup);
        SendClientMessage(playerid, COLOR_BIJELA, "Glьckwunsch! Kauf dir nun damit was.");
        GivePlayerCash(playerid, money);
        ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
    }
Reply
#6

Helps a lot when you only post 1 if condition instead of your whole OPPP callback. Theres nothing wrong with pickups (and I have roughtly ~300 of them on my server).

Do you have several OPPP callbacks, like a gamemode one and then in a filterscript? It's a known issue and will hopefully be resolved in future releases.
Reply
#7

I posted this bug before (https://sampforum.blast.hk/showthread.php?tid=326255) apparently Kye doesn't care about it.
Pickup ID's start being messed up after restart (GMX) because the ID's are reset for the gamemode but not for the filterscripts, confirmed multiple times over many years, yet not fixed.
Reply
#8

I experienced this back then but I didn't even have filterscripts running on my game-mode and still, the pickup IDs got messed up.
Reply
#9

And another reason was given not to use gmx.
Reply
#10

Even if you don't GMX, this problem can still be caused by IDs getting over-written:

pawn Код:
new pickup1, pickup2;

pickup1 = CreatePickup(blah);

DestroyPickup(pickup1);

pickup2 = CreatePickup(blah);
The 'pickup1' and 'pickup2' variables are the SAME value, so both of these are true:

pawn Код:
if(pickupid == pickup1)

if(pickupid == pickup2)
I guess the only way to solve this would be for you to make a variable to store whether it is created or not:

pawn Код:
new pickup1, pickup2;
new pickup1_created, pickup2_created;

pickup1 = CreatePickup(blah);
pickup1_created = 1;

DestroyPickup(pickup1);
pickup1_created = 0;

pickup2 = CreatePickup(blah);
pickup2_created = 1;
The 'pickup1' and 'pickup2' variables are the SAME value still, but this time pickup1_created is 0

pawn Код:
if(pickupid == pickup1 && pickup1_created)

if(pickupid == pickup2 && pickup2_created)
There's really nothing Kalcor himself can do about this, it's up to you.

As for the GMX bug, I am yet to test it, but I do know that filterscripts do not unload during a GMX - resetting the pickups in them would break them, but they still need to run along-side the gamemode. It just needs making so game-modes don't take the IDs of already taken pickups.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)