Streamer pickups
#1

Hey

How I can toggle a pickup for a specific player?

If I use Streamer_RemoveArrayData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_PLAYER_ID, playerid); or Streamer_AppendArrayData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_PLAYER_ID, playerid);

and Streamer_Update(playerid, STREAMER_TYPE_PICKUP); the pickup sometimes dissapears after a few seconds but I think it should dissapear instantly

I tried this with different pickup types also type 3 which Disappears after pickup, respawns after death but it not working.

I want to make a police bribe system so the pickup have to dissapear instantly like in singleplayer.
Reply
#2

Just use type 2 ?
Reply
#3

I said i tried with different types... of course, I tried type 2 too
Reply
#4

If you create pickupd with classic way and type 2 and then if you pick it will be per player.
See
pawn Код:
Streamer_ToggleItem(playerid, type, STREAMER_ALL_TAGS:id, toggle);
it should be this what you looking for
Reply
#5

It seems like working now. I've set
Код:
Streamer_Update(playerid, STREAMER_TYPE_PICKUP);
after toggling the pickup.

Thanks for your help
Reply
#6

Type 23 is good.
Reply
#7

Sometimes the pickup only appear / dissapear when it's re-streaming for the player :/ but just whenever I toggle them under OnPlayerSpawn
Reply
#8

Item toggling through that native isn't always updated when it's called. You can also add/remove an ID from the playerid array using Streamer_AppendArrayData and Streamer_RemoveArrayData on E_PLAYER_ID.

But the problem might not even be related to that.
Pickups are global, so if ANY player is near a dynamic pickup that is streamed for them it will appear for everyone (since a global pickup will be created).
Making Pickups togglable per player will never really work because of that. You can only disable the functionality per-player.

If it's absolutely neccessary to have it per-player you could reside to an object combined with a dynamic area, which will be truly per-player.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)