SA-MP Forums Archive
[Plugin] Streamer Plugin - 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: Plugin Development (https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: [Plugin] Streamer Plugin (/showthread.php?tid=102865)



Re: Streamer Plugin - NaS - 24.12.2016

Quote:
Originally Posted by ball
Посмотреть сообщение
So test this code

Код:
CreateDynamic3DTextLabel("Nitro", -1, 0.0, 0.0, 3.0, 5.0, .testlos = 0, .streamdistance = -1.0);
CreateDynamic3DTextLabel("Repair", -1, 0.0, 0.0, 13.0, 5.0, .testlos = 0, .streamdistance = -1.0);
I can't see these labels from far distance.



I know that, but why if I could make it better by making it static?
The labels will be only visible within 5 meters. You must set the DrawDistance (5.0 in your case) to a higher value as well.


Re: Streamer Plugin - corne - 08.01.2017

Whoops, might've figured it out right after I posted it, lmao.


Re: Streamer Plugin - Chaprnks - 12.01.2017

Quote:
Originally Posted by kurta999
Посмотреть сообщение
Yes, but it's bugged. Sometimes vehicle disappear or it's trainer and I don't know why. (There was a vehicle streamer, it also has similar bug nevertheless with mine version it's a bit different)

Maybe in the future I will check this again, but now I even don't have a normal computer to run Visual Studio. Therefore, it's now difficult.
You talking about this one?

https://github.com/maddinat0r/samp-streamer/
PHP код:
native MSP_SetRangeCheckType(E_STREAMER_RANGECHECK_TYPE:checktype);
native E_STREAMER_RANGECHECK_TYPE:MSP_GetRangeCheckType();
native MSP_SetVehicleStreamDist(Float:distance);
native Float:MSP_GetVehicleStreamDist();
native MSP_CreateVehicle(modelidFloat:pos_xFloat:pos_yFloat:pos_zFloat:pos_acolor1color2);
native MSP_DestroyVehicle(vehicleid); 



Re: Streamer Plugin - wallee - 20.01.2017

Can anyone tell me what's the difference between stream distance and draw distance?


Re: Streamer Plugin - IstuntmanI - 20.01.2017

Quote:
Originally Posted by wallee
Посмотреть сообщение
Can anyone tell me what's the difference between stream distance and draw distance?
Previous page: http://forum.sa-mp.com/showpost.php?...postcount=5558


Re: Streamer Plugin - wallee - 20.01.2017

Quote:
Originally Posted by IstuntmanI
Посмотреть сообщение
Wow

i used the search this thread tool and it didn't find it and yet it was on the other page

ty


Re: Streamer Plugin - wallee - 20.01.2017

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


Re: Streamer Plugin - wallee - 28.01.2017

Quote:
Originally Posted by wallee
Посмотреть сообщение
Is there a way to get the IDs of all the currently visible objects?



Re: Streamer Plugin - Blokkmonsta - 28.01.2017

Quote:
Originally Posted by wallee
Посмотреть сообщение
You can loop through all objects and use "Streamer_IsItemVisible".


Re: Streamer Plugin - TheBob - 28.01.2017

The Best Of aLL Plugins Ever


Re: Streamer Plugin - wallee - 28.01.2017

Quote:
Originally Posted by Blokkmonsta
Посмотреть сообщение
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


Re: Streamer Plugin - Blokkmonsta - 28.01.2017

Quote:
Originally Posted by wallee
Посмотреть сообщение
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.


Re: Streamer Plugin - Lordzy - 02.02.2017

You can use Streamer_GetNearbyItems to get all the near by items streamed.
pawn Код:
native Streamer_GetNearbyItems(Float:x, Float:y, Float:z, type, STREAMER_ALL_TAGS items[], maxitems = sizeof items, Float:range = 300.0);
Usage example:
pawn Код:
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



Re: Streamer Plugin - Sanady - 06.02.2017

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?


Re: Streamer Plugin - NaS - 07.02.2017

Quote:
Originally Posted by Sanady
Посмотреть сообщение
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.


Re: Streamer Plugin - MrStead - 14.02.2017

Why the callback OnPlayerEnterDynamicArea(playerid, areaid) is not working(not calling) after using the Streamer_SetArrayData or Streamer_SetIntData with the type E_STREAMER_EXTRA_ID to add my own data? i use 2.8.2 version
PHP код:
new area CreateDynamicCircle(0.00.02500.0), arr[] = {51029320};
Streamer_SetArrayData(STREAMER_TYPE_AREAareaE_STREAMER_EXTRA_IDarr);
public 
OnPlayerEnterDynamicArea(playeridareaid)
{
    new 
arr2[3];
    
Streamer_GetArrayData(STREAMER_TYPE_AREAareaidE_STREAMER_EXTRA_IDarr2);
    
printf("Streamer_GetArrayData = %i,%i,%i"arr2[0], arr2[1], arr2[2]);
    return 
1;




Re: Streamer Plugin - AbyssMorgan - 14.02.2017

Quote:
Originally Posted by MrStead
Посмотреть сообщение
Why the callback OnPlayerEnterDynamicArea(playerid, areaid) is not working(not calling) after using the Streamer_SetArrayData or Streamer_SetIntData with the type E_STREAMER_EXTRA_ID to add my own data? i use 2.8.2 version
PHP код:
new area CreateDynamicCircle(0.00.02500.0), arr[] = {51029320};
Streamer_SetArrayData(STREAMER_TYPE_AREAareaE_STREAMER_EXTRA_IDarr);
public 
OnPlayerEnterDynamicArea(playeridareaid)
{
    new 
arr2[3];
    
Streamer_GetArrayData(STREAMER_TYPE_AREAareaidE_STREAMER_EXTRA_IDarr2);
    
printf("Streamer_GetArrayData = %i,%i,%i"arr2[0], arr2[1], arr2[2]);
    return 
1;

E_STREAMER_EXTRA_ID is integer value


Re: Streamer Plugin - Spmn - 14.02.2017

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
E_STREAMER_EXTRA_ID is integer value
E_STREAMER_EXTRA_ID can have any type.


Re: Streamer Plugin - Sanady - 14.02.2017

Quote:
Originally Posted by Spmn
Посмотреть сообщение
E_STREAMER_EXTRA_ID can have any type.
How it can have any type? So far I know that ID is number, I haven`t seen that ID in SA-MP are letters. Maybe I am wrong but that is what I know.


Re: Streamer Plugin - stabker - 14.02.2017

Quote:
Originally Posted by Sanady
Посмотреть сообщение
How it can have any type? So far I know that ID is number, I haven`t seen that ID in SA-MP are letters. Maybe I am wrong but that is what I know.
This is an extra variable where you can store everything you need.