SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 20/01/2017, 03:48 PM   #5321
wallee
Huge Clucker
 
Join Date: Jan 2017
Posts: 264
Reputation: 40
Default Re: Streamer Plugin

Is there a way to get the IDs of all the currently visible objects?

Last edited by wallee; 28/01/2017 at 01:18 PM.
wallee is offline   Reply With Quote
Old 28/01/2017, 01:18 PM   #5322
wallee
Huge Clucker
 
Join Date: Jan 2017
Posts: 264
Reputation: 40
Default Re: Streamer Plugin

Quote:
Originally Posted by wallee View Post
Is there a way to get the IDs of all the currently visible objects?
wallee is offline   Reply With Quote
Old 28/01/2017, 01:53 PM   #5323
Blokkmonsta
Big Clucker
 
Blokkmonsta's Avatar
 
Join Date: Mar 2008
Posts: 102
Reputation: 3
Default Re: Streamer Plugin

Quote:
Originally Posted by wallee View Post
You can loop through all objects and use "Streamer_IsItemVisible".
Blokkmonsta is offline   Reply With Quote
Old 28/01/2017, 03:18 PM   #5324
TheBob
Huge Clucker
 
TheBob's Avatar
 
Join Date: Nov 2014
Posts: 341
Reputation: 6
Default Re: Streamer Plugin

The Best Of aLL Plugins Ever
TheBob is offline   Reply With Quote
Old 28/01/2017, 05:19 PM   #5325
wallee
Huge Clucker
 
Join Date: Jan 2017
Posts: 264
Reputation: 40
Default Re: Streamer Plugin

Quote:
Originally Posted by Blokkmonsta View Post
You can loop through all objects and use "Streamer_IsItemVisible".
that would defeat the purpose... the streamer already "knows" what a certain player sees so me making a loop through all the objects again would be wasting resources
wallee is offline   Reply With Quote
Old 28/01/2017, 07:39 PM   #5326
Blokkmonsta
Big Clucker
 
Blokkmonsta's Avatar
 
Join Date: Mar 2008
Posts: 102
Reputation: 3
Default Re: Streamer Plugin

Quote:
Originally Posted by wallee View Post
that would defeat the purpose... the streamer already "knows" what a certain player sees so me making a loop through all the objects again would be wasting resources
True. But currently there is no other way.
Blokkmonsta is offline   Reply With Quote
Old 31/01/2017, 11:26 PM   #5327
rt-2
Huge Clucker
 
rt-2's Avatar
 
Join Date: Jun 2011
Location: Montréal, Québec, Canada
Posts: 285
Reputation: 26
Default Re: Streamer Plugin

Quote:
Originally Posted by Blokkmonsta View Post
True. But currently there is no other way.
How could the streamer tell you this without doing the exact same loop anyway? IMO
__________________
rt-2
-------------------------------------------------
rt-2 is online now   Reply With Quote
Old 02/02/2017, 02:41 AM   #5328
Lordzy
High-roller
 
Lordzy's Avatar
 
Join Date: Mar 2012
Location: NetherRealm
Posts: 2,698
Reputation: 1177
Default Re: Streamer Plugin

You can use Streamer_GetNearbyItems to get all the near by items streamed.
pawn Code:
native Streamer_GetNearbyItems(Float:x, Float:y, Float:z, type, STREAMER_ALL_TAGS items[], maxitems = sizeof items, Float:range = 300.0);

Usage example:
pawn Code:
const
    MAX_OBJECTS_ON_RANGE = 150,
    Float:MAX_VISIBLE_RANGE = 250.0
;
new streamerObjectArray[MAX_OBJECTS_ON_RANGE] = {-1, ...};

//To hold all the objects visible on a range.
new
    Float:fX, Float:fY, Float:fZ;
GetPlayerPos(playerid, fX, fY, fZ);
Streamer_GetNearbyItems(fX, fY, fZ, STREAMER_TYPE_OBJECT, streamerObjectArray, sizeof(streamerObjectArray), MAX_VISIBLE_RANGE);

//streamerObjectArray now holds the ids of visible objects of "playerid".

for(new i = 0; streamerObjectArray[i] != -1; i++) //Loop through
__________________
Currently inactive - I don't play at any SA-MP servers nor work on anything in PAWN for now. The projects that I've done so far in PAWN, which requires updates will be taking some time.
Lordzy is offline   Reply With Quote
Old 06/02/2017, 04:51 PM   #5329
Sanady
High-roller
 
Sanady's Avatar
 
Join Date: May 2012
Location: Los Santos
Posts: 1,174
Reputation: 132
Default Re: Streamer Plugin

Ok so, when I start server streamer won`t load and windows error came out that ucrtbased.dll is missing. What should I install, C++ runtime library?
__________________

Sanady is offline   Reply With Quote
Old 07/02/2017, 12:47 PM   #5330
NaS
High-roller
 
NaS's Avatar
 
Join Date: Mar 2008
Location: 🇩🇪
Posts: 1,785
Reputation: 635
Default Re: Streamer Plugin

Quote:
Originally Posted by Sanady View Post
Ok so, when I start server streamer won`t load and windows error came out that ucrtbased.dll is missing. What should I install, C++ runtime library?
It's part of MS VC 2015, so it should also be in the respective Runtime package.
NaS 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
[Include] Checkpoint / Area sub-streamer for incognito's streamer plugin Pottus Includes 9 21/03/2014 06:31 PM
Need 3dtextlabel Streamer And Gangzone Streamer !! Please Help . Not streamer plugin . jame42 Scripting Help 4 30/05/2012 07:33 AM
Streamer plugin 0.3d rt-2 Plugin Development 7 05/12/2011 06:17 PM
Streamer Plugin Help! ColdXX Everything and Nothing 2 21/08/2010 10:28 PM
Streamer Plugin! ColdXX Help Archive 10 18/07/2010 12:47 PM


All times are GMT. The time now is 03:54 PM.


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