Streamer pickups - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Streamer pickups (
/showthread.php?tid=660721)
Streamer pickups -
m4karow - 11.11.2018
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.
Re: Streamer pickups -
Jefff - 11.11.2018
Just use type 2 ?
Re: Streamer pickups -
m4karow - 11.11.2018
I said i tried with different types... of course, I tried type 2 too
Re: Streamer pickups -
Jefff - 11.11.2018
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
Re: Streamer pickups -
m4karow - 11.11.2018
It seems like working now. I've set
Код:
Streamer_Update(playerid, STREAMER_TYPE_PICKUP);
after toggling the pickup.
Thanks for your help
Re: Streamer pickups -
Calisthenics - 11.11.2018
Type 23 is good.
Re: Streamer pickups -
m4karow - 11.11.2018
Sometimes the pickup only appear / dissapear when it's re-streaming for the player :/ but just whenever I toggle them under OnPlayerSpawn
Re: Streamer pickups -
NaS - 11.11.2018
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.