Mtasa-blue: Server-side only elements

Created on 7 Jan 2020  路  2Comments  路  Source: multitheftauto/mtasa-blue

Is your feature request related to a problem? Please describe.
There are numbers of situations when some entity should be handled by several resources but replication to the client-side is redundant. The simplest example is a spawnpoint. In my practice was not any case in which spawnpoints had used on a client-side. But maintaining spawnpoints as elements is a very convenient so it'll be desirable to add an opportunity to decide replicate an element or don't.

Describe the solution you'd like
I propose to add a new argument to createElement function that tells the game about a local nature of an element.
For example, createElement( string elementType, [ string elementID = nil, bool isLocal = false ] )

Describe alternatives you've considered
At the moment there are two kind of approaches to handle this. The first one is to create elements as is, do all the work to replicate element for a client. And second one is to syncronize a table between resources, that in most cases is painful and unreliable.

enhancement

Most helpful comment

Sounds fine to me. The intent seems clearer if it's named bool synced = true.

Want to avoid using the word "local" since people are used to localPlayer and it might cause confusion (i.e. thinking it means "client only")

All 2 comments

only serverside colshape too are useful

Sounds fine to me. The intent seems clearer if it's named bool synced = true.

Want to avoid using the word "local" since people are used to localPlayer and it might cause confusion (i.e. thinking it means "client only")

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LosFaul picture LosFaul  路  3Comments

rk-r picture rk-r  路  4Comments

Haxardous picture Haxardous  路  3Comments

StifflersMom picture StifflersMom  路  4Comments

ALw7sH picture ALw7sH  路  3Comments