Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

ServerSide streamer for alt:V using entitySync. Based on @DasNiels work.

License

Notifications You must be signed in to change notification settings

LameuleFR/altv-csharp-streamer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

altv-csharp-streamer

ServerSide Streamer using EntitySync. Initially Based on @DasNiels Work.

Current Streamer Available

  • TextLabel
  • HelpText
  • Marker
  • Object
  • Blip (Static/Dynamic)
  • Door

Installation

This resource makes use of the AltV.Net.EntitySync (v1.13.0) and AltV.Net.EntitySync.ServerEvent (v9.0.2) nuget package, make sure to install those prior to using this resource.

Make sure to add the following code to your gamemode's OnStart() method(the streamer won't work without it!): // Documentation: https://docs.altv.mp/cs/articles/entity-sync.html

AltEntitySync.Init(8, (syncrate) => 200, (threadId) => false,
   (threadCount, repository) => new ServerEventNetworkLayer(threadCount, repository),
   (entity, threadCount) => entity.Type,
   (entityId, entityType, threadCount) => entityType,
   (threadId) =>
   {
	   return threadId switch
	   {
		   //MARKER
		   0 => new LimitedGrid3(50_000, 50_000, 75, 10_000, 10_000, 64),
		   //TEXT
		   1 => new LimitedGrid3(50_000, 50_000, 75, 10_000, 10_000, 32),
		   //PROP
		   2 => new LimitedGrid3(50_000, 50_000, 100, 10_000, 10_000, 1500),
		   //HELP TEXT
		   3 => new LimitedGrid3(50_000, 50_000, 100, 10_000, 10_000, 1),
		   //BLIP
		   4 => new EntityStreamer.GlobalEntity(),
		   //DYNAMIC BLIP
		   5 => new LimitedGrid3(50_000, 50_000, 175, 10_000, 10_000, 200),
		   //DOOR
		   6 => new LimitedGrid3(50_000, 50_000, 175, 10_000, 10_000, 50),
		   _ => new LimitedGrid3(50_000, 50_000, 175, 10_000, 10_000, 115),
	   };
   },
new IdProvider());

Credits

Original Object Streamer: https://github.com/DasNiels/altv-object-streamer/ Original Text Streamer: https://github.com/DasNiels/altv-textlabel-streamer Original Marker Streamer: https://github.com/DasNiels/altv-marker-streamer

About

ServerSide streamer for alt:V using entitySync. Based on @DasNiels work.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published