[Plugin] Streamer Plugin with Vehicle Streamer
#1

I've decided to open new topic, I don't want to trash original one. I would like if Incognito was merge it into offical streamer, but before hard testing needed to avoid bugs.

This streamer version is 2.9.1

pawn Code:
#define STREAMER_TYPE_VEHICLE (8)

#define STREAMER_VEHICLE_TYPE_STATIC (0)
#define STREAMER_VEHICLE_TYPE_DYNAMIC (1)

native AttachDynamicObjectToVehicle(STREAMER_TAG_OBJECT objectid, vehicleid, Float:offsetx, Float:offsety, Float:offsetz, Float:rx, Float:ry, Float:rz, vehicletype = STREAMER_VEHICLE_TYPE_DYNAMIC);
native STREAMER_TAG_3D_TEXT_LABEL CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, vehicletype = STREAMER_VEHICLE_TYPE_DYNAMIC, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_3D_TEXT_LABEL_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0);
native AttachDynamicAreaToVehicle(STREAMER_TAG_AREA areaid, vehicleid, vehicletype = STREAMER_VEHICLE_TYPE_DYNAMIC, Float:offsetx = 0.0, Float:offsety = 0.0, Float:offsetz = 0.0);

// Natives (Vehicles)
native STREAMER_TAG_VEHICLE CreateDynamicVehicle(modelid, Float:fX, Float:fY, Float:fZ, Float:fRot, color1, color2, respawndelay, addsiren = 0, worldid = -1, interiorid = 0, playerid = -1, Float:streamdistance = STREAMER_VEHICLE_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0);
native DestroyDynamicVehicle(STREAMER_TAG_VEHICLE vehicleid);
native IsValidDynamicVehicle(STREAMER_TAG_VEHICLE vehicleid);
native IsDynamicVehicleStreamedIn(STREAMER_TAG_VEHICLE vehicleid, forplayerid);
native GetDynamicVehicleSpawnInfo(STREAMER_TAG_VEHICLE vehicleid, &Float:fX, &Float:fY, &Float:fZ, &Float:fRot, &color1, &color2, &siren);
native GetDynamicVehiclePos(STREAMER_TAG_VEHICLE vehicleid, &Float:x, &Float:y, &Float:z);
native SetDynamicVehiclePos(STREAMER_TAG_VEHICLE vehicleid, Float:x, Float:y, Float:z);
native GetDynamicVehicleZAngle(STREAMER_TAG_VEHICLE vehicleid, &Float:z_angle);
native GetDynamicVehicleRotationQuat(STREAMER_TAG_VEHICLE vehicleid, &Float:w, &Float:x, &Float:y, &Float:z);
native SetDynamicVehicleZAngle(STREAMER_TAG_VEHICLE vehicleid, Float:z_angle);
native Float:GetDynamicVehDistanceFromPoint(STREAMER_TAG_VEHICLE vehicleid, Float:X, Float:Y, Float:Z);
native SetDynamicVehParamsForPlayer(STREAMER_TAG_VEHICLE vehicleid,playerid,objective,doorslocked);
native SetDynamicVehicleParamsEx(STREAMER_TAG_VEHICLE vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
native GetDynamicVehicleParamsEx(STREAMER_TAG_VEHICLE vehicleid, &engine, &lights, &alarm, &doors, &bonnet, &boot, &objective);
native GetDynamicVehParamsSirenState(STREAMER_TAG_VEHICLE vehicleid);
native SetDynamicVehParamsCarDoors(STREAMER_TAG_VEHICLE vehicleid, driver, passenger, backleft, backright);
native GetDynamicVehParamsCarDoors(STREAMER_TAG_VEHICLE vehicleid, &driver, &passenger, &backleft, &backright);
native SetDynamicVehParamsCarWindows(STREAMER_TAG_VEHICLE vehicleid, driver, passenger, backleft, backright);
native GetDynamicVehParamsCarWindows(STREAMER_TAG_VEHICLE vehicleid, &driver, &passenger, &backleft, &backright);
native SetDynamicVehicleToRespawn(STREAMER_TAG_VEHICLE vehicleid);
native LinkDynamicVehicleToInterior(STREAMER_TAG_VEHICLE vehicleid, interiorid);
native GetDynamicVehicleInterior(STREAMER_TAG_VEHICLE vehicleid);
native AddDynamicVehicleComponent(STREAMER_TAG_VEHICLE vehicleid, componentid);
native RemoveDynamicVehicleComponent(STREAMER_TAG_VEHICLE vehicleid, componentid);
native ChangeDynamicVehicleColor(STREAMER_TAG_VEHICLE vehicleid, color1, color2);
native GetDynamicVehicleColor(STREAMER_TAG_VEHICLE vehicleid, &color1, &color2);
native ChangeDynamicVehiclePaintjob(STREAMER_TAG_VEHICLE vehicleid, paintjobid);
native GetDynamicVehiclePaintjob(STREAMER_TAG_VEHICLE vehicleid);
native SetDynamicVehicleHealth(STREAMER_TAG_VEHICLE vehicleid, Float:health);
native GetDynamicVehicleHealth(STREAMER_TAG_VEHICLE vehicleid, &Float:health);
native AttachTrailerToDynamicVehicle(STREAMER_TAG_VEHICLE trailerid, STREAMER_TAG_VEHICLE vehicleid);
native DetachTrailerFromDynamicVeh(STREAMER_TAG_VEHICLE vehicleid);
native IsTrailerAttachedToDynamicVeh(STREAMER_TAG_VEHICLE vehicleid);
native GetDynamicVehicleTrailer(STREAMER_TAG_VEHICLE vehicleid);
native SetDynamicVehicleNumberPlate(STREAMER_TAG_VEHICLE vehicleid, plate[]);
native GetDynamicVehicleNumberPlate(STREAMER_TAG_VEHICLE vehicleid, plate[], size = sizeof(plate));
native GetDynamicVehicleModel(STREAMER_TAG_VEHICLE vehicleid);
native GetDynamicVehComponentInSlot(STREAMER_TAG_VEHICLE vehicleid, slot); // There is 1 slot for each CARMODTYPE_*
native RepairDynamicVehicle(STREAMER_TAG_VEHICLE vehicleid); // Repairs the damage model and resets the health
native GetDynamicVehicleVelocity(STREAMER_TAG_VEHICLE vehicleid, &Float:X, &Float:Y, &Float:Z);
native SetDynamicVehicleVelocity(STREAMER_TAG_VEHICLE vehicleid, Float:X, Float:Y, Float:Z);
native SetDynamicVehAngularVelocity(STREAMER_TAG_VEHICLE vehicleid, Float:X, Float:Y, Float:Z);
native GetDynamicVehicleDamageStatus(STREAMER_TAG_VEHICLE vehicleid, &panels, &doors, &lights, &tires);
native UpdateDynamicVehDamageStatus(STREAMER_TAG_VEHICLE vehicleid, panels, doors, lights, tires);
native SetDynamicVehicleVirtualWorld(STREAMER_TAG_VEHICLE vehicleid, worldid);
native GetDynamicVehicleVirtualWorld(STREAMER_TAG_VEHICLEvehicleid);
native GetPlayerSurfingDynamicVehID(playerid);
native PutPlayerInDynamicVehicle(playerid, STREAMER_TAG_VEHICLE vehicleid, seatid);
native GetPlayerDynamicVehicleID(playerid);
native IsPlayerInDynamicVehicle(playerid, STREAMER_TAG_VEHICLE vehicleid);
native IsPlayerInAnyDynamicVehicle(STREAMER_TAG_VEHICLE vehicleid);
native IsDynamicVehicleOccupied(STREAMER_TAG_VEHICLE vehicleid);
native PlayerSpectateDynamicVehicle(playerid, STREAMER_TAG_VEHICLE targetvehicleid, mode = 0);

forward OnDynamicVehicleSpawn(vehicleid);
forward OnDynamicVehicleDeath(vehicleid, killerid);
forward OnPlayerEnterDynamicVehicle(playerid, vehicleid, ispassenger);
forward OnPlayerExitDynamicVehicle(playerid, vehicleid);
forward OnDynamicVehicleMod(playerid, vehicleid, componentid);
forward OnDynamicVehiclePaintjob(playerid, vehicleid, paintjobid);
forward OnDynamicVehicleRespray(playerid, vehicleid, color1, color2);
forward OnDynamicVehDamageStatusUpdate(vehicleid, playerid);
forward OnUnoccupiedDynamicVehUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z);
forward OnDynamicVehicleStreamIn(vehicleid, forplayerid);
forward OnDynamicVehicleStreamOut(vehicleid, forplayerid);
forward OnDynamicTrailerUpdate(playerid, vehicleid);
forward OnDynamicVehSirenStateChange(playerid, vehicleid, newstate);
Note:
- This streamer doesn't support trains and might not in the near future.

Download:
Win & Linux: https://www.anonfiles.cc/file/c611eb...de48e8c4436c08
Source: https://github.com/kurta999/samp-streamer-plugin

Bugs:
- If you found any, please report it immendiately!
Reply
#2

Is the original streamer plugin integrated with this one? I don't quite understand.
Reply
#3

Quote:
Originally Posted by JaydenJason
View Post
Is the original streamer plugin integrated with this one? I don't quite understand.
Yes it is, if you will look at source or inc file you can see that it has dynamic object, text lablel..etc functions too.
Nice work
Suggestion: You should add GetDynamicVehiclePoolSize() too because mostly people loops from 0 to MAX_VEHICLES.
Reply
#4

Quote:
Originally Posted by BroZeus
View Post
Yes it is, if you will look at source or inc file you can see that it has dynamic object, text lablel..etc functions too.
Nice work
Suggestion: You should add GetDynamicVehiclePoolSize() too because mostly people loops from 0 to MAX_VEHICLES.
Maybe a deprecated function, but you can do this with all streamer items
pawn Code:
Streamer_GetUpperBound(STREAMER_TYPE_VEHICLE)
Reply
#5

Amazing!
Reply
#6

Kurta, the only difference between the samp vehicle streamer and your vehicle streamer is the modified respawn system?
Reply
#7

Quote:
Originally Posted by ExTaZZ69
View Post
Kurta, the only difference between the samp vehicle streamer and your vehicle streamer is the modified respawn system?
No. With samp vehicle streamer you can create only 2000 vehicles, with this unlimited*.

* 2000 at same time.
Reply
#8

I still think this is a wasted effort it's like trying to use the object pool to stream objects for players. The more players you have the less vehicles that can be streamed per player.

When someone with a large server actually tries to use this there is going to be all sorts of problems with vehicles not streaming when they should be. It's fine it works on your smaller server but that does no justice if this was actually to be used as intended on a large server.

Just picture a large amount of cars in one area and you can't get your car because it won't stream in because the server has 200 players all streaming.
Reply
#9

Quote:
Originally Posted by Pottus
View Post
I still think this is a wasted effort it's like trying to use the object pool to stream objects for players. The more players you have the less vehicles that can be streamed per player.

When someone with a large server actually tries to use this there is going to be all sorts of problems with vehicles not streaming when they should be. It's fine it works on your smaller server but that does no justice if this was actually to be used as intended on a large server.

Just picture a large amount of cars in one area and you can't get your car because it won't stream in because the server has 200 players all streaming.
Agreed with this, for some reason I've always had problems in SA-MP with vehicle IDs swapping (so you lose track of the vehicle but it still exists, or doesn't, etc) which I've known many others to have problems with also, this streamer would not only make that worse but also the idea itself is just generally not the best for SA-MP.
Reply
#10

Quote:
Originally Posted by Pottus
View Post
I still think this is a wasted effort it's like trying to use the object pool to stream objects for players. The more players you have the less vehicles that can be streamed per player.

When someone with a large server actually tries to use this there is going to be all sorts of problems with vehicles not streaming when they should be. It's fine it works on your smaller server but that does no justice if this was actually to be used as intended on a large server.

Just picture a large amount of cars in one area and you can't get your car because it won't stream in because the server has 200 players all streaming.
Yes, that's true. But I don't have that much amount of players and lof of servers doesn't - anyway same will happens with pickups, from your view pickup streamer is useless too?

In back of samp, till no per-player textdraws, servers with 400-500 just can use normal speedometer, and 1-2 textdraws for players because textdraw pool is 2048 AFAIK.

Fallout speedometer 3 TD per player in server with 500 slots, 1500 TD. One free slot remain free for per-player usage. But servers like mine and others too, it wasn't problem because I has only 60 slot server. Same with vehicle streamer, I made it because I want to get maximum from samp. Which server playerbase is around 100, it's a big help for them if want to use lot vehicles. (Please don't say that it will lagg, because it's not if you not place 100 vehicles at same location. You can create your own island outside of SA, create jumps in air and you can use vehicles in different worlds too)
Reply
#11

If you have enough pickups it would eventually cause issues but how many people actually need that many pickups to even get there?
Reply
#12

Quote:
Originally Posted by Pottus
View Post
If you have enough pickups it would eventually cause issues but how many people actually need that many pickups to even get there?
I don't know that, but I have around 4700 pickups now, caused by houses in SA.
Reply
#13

Would it be possible to create a PerPlayerVehicle by sending fake RPC? It would be enough just for unoccupied vehicles for this to work much better.
Reply
#14

Maybe, but that would require FUCKING MUCH work which I won't do.

Anway now I'm on my way, still improving the streamer. I'll create soon pull request on github official streamer plugin at vehicle-streamer branch.
Reply
#15

Bin download link is dead (& there's no compiled binaries on the github releases)
Reply
#16

awesome!
Reply
#17

Download link dead.
Reply
#18

Fucking .tk domain expired, fixed.
Reply
#19

Quote:
Originally Posted by kurta999
View Post
Fucking .tk domain expired, fixed.
Get a .bit domain for free
Reply
#20

kurta999 i have been following your work with YSF for some time and the fact that you keep coming up with these new ideas is awesome man, right YSF i love it i use it but now back on topic,
So i see allot of usage for this streamer i am just a bit confused in some things,
So Sa-mp it self limits you to 2000 vehicles, and unlimited models, ok, however say if i have a server with 200 players and all of them own vehicles say 10 p/player that's my limit bang on, cant even add more static ones, so this streamer has allot potential to me!
But would this fact that only 1000 objects can be seen by the player affect the vehicles streamed ?
And if so how can we raise the limit of streamed objects the player can see (vehicles , objects etc..) ?
As by default i might be wrong but i think sa-mp limits it and i don't mean the draw distance but the actual amount of streamed objects in players area...
Hope that makes scence ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)