[Plugin] Streamer Plugin

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.
Reply

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

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); 
Reply

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

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
Reply

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
Reply

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

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

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

The Best Of aLL Plugins Ever
Reply

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
Reply

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.
Reply

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
Reply

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?
Reply

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.
Reply

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;

Reply

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
Reply

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

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.
Reply

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.
Reply


Forum Jump:


Users browsing this thread: 7 Guest(s)