Entity

From GT-MP
Jump to: navigation, search

Entity class

The Entity class represent an entity in your server.

Using

GrandTheftMultiplayer.Server.Elements.Entity

using GrandTheftMultiplayer.Server.Elements.;


Entity Properties

Name Type Accessibility Description
handle GrandTheftMultiplayer.Shared.NetHandle Writeable ?
Value Int32 Read-Only ?
freezePosition Boolean Writeable-Only ?
position GrandTheftMultiplayer.Shared.Math.Vector3 Writeable ?
rotation GrandTheftMultiplayer.Shared.Math.Vector3 Writeable ?
IsNull Boolean Read-Only ?
exists Boolean Read-Only ?
type GrandTheftMultiplayer.Shared.EntityType Read-Only ?
transparency Int32 Writeable ?
dimension Int32 Writeable ?
invincible Boolean Writeable ?
collisionless Boolean Writeable ?
model Int32 Read-Only ?

Entity Methods

Name Return Parameters Description
get_handle() GrandTheftMultiplayer.Shared.NetHandle ?
get_Value() Int32 ?
op_Implicit() GrandTheftMultiplayer.Shared.NetHandle GrandTheftMultiplayer.Server.Elements.Entity c ?
GetHashCode() Int32 ?
Equals() Boolean System.Object obj ?
op_Equality() Boolean GrandTheftMultiplayer.Server.Elements.Entity left, GrandTheftMultiplayer.Server.Elements.Entity right ?
op_Inequality() Boolean GrandTheftMultiplayer.Server.Elements.Entity left, GrandTheftMultiplayer.Server.Elements.Entity right ?
set_freezePosition() Void Boolean value ?
set_position() Void GrandTheftMultiplayer.Shared.Math.Vector3 value ?
get_position() GrandTheftMultiplayer.Shared.Math.Vector3 ?
set_rotation() Void GrandTheftMultiplayer.Shared.Math.Vector3 value ?
get_rotation() GrandTheftMultiplayer.Shared.Math.Vector3 ?
get_IsNull() Boolean ?
get_exists() Boolean ?
get_type() GrandTheftMultiplayer.Shared.EntityType ?
set_transparency() Void Int32 value ?
get_transparency() Int32 ?
set_dimension() Void Int32 value ?
get_dimension() Int32 ?
set_invincible() Void Boolean value ?
get_invincible() Boolean ?
set_collisionless() Void Boolean value ?
get_collisionless() Boolean ?
get_model() Int32 ?
delete() Void ?
movePosition() Void GrandTheftMultiplayer.Shared.Math.Vector3 target, Int32 duration ?
moveRotation() Void GrandTheftMultiplayer.Shared.Math.Vector3 target, Int32 duration ?
attachTo() Void GrandTheftMultiplayer.Shared.NetHandle entity, String bone, GrandTheftMultiplayer.Shared.Math.Vector3 offset, GrandTheftMultiplayer.Shared.Math.Vector3 rotation ?
detach() Void ?
detach() Void Boolean resetCollision ?
createParticleEffect() Void String ptfxLib, String ptfxName, GrandTheftMultiplayer.Shared.Math.Vector3 offset, GrandTheftMultiplayer.Shared.Math.Vector3 rotation, System.Single scale, Int32 bone ?
setSyncedData() Void String key, System.Object value ?
getSyncedData() System.Object String key ?
resetSyncedData() Void String key ?
hasSyncedData() Boolean String key ?
setData() Void String key, System.Object value ?
getData() System.Object String key ?
resetData() Void String key ?
hasData() Boolean String key ?
ToString() String ?
GetType() System.Type ?
waitForSynchronization() Boolean Int32 timeout Waits until the entity is known to all clients. (For working with newly created objects like vehicles). Returns whether the synchronization was successful within the timeout duration or not.

This does not guarantee that the entity is streamed in on the client(s), it just means that the entity is known (and can be updated serverside). If you need to work with it on clientside you will need to check if the entity is streamed in (e.g. by hooking to the onEntityStreamIn event). Entities that are not streamed in can not be accessed using the clientside API.

Default timeout = 1000ms (Version 0.1.7)

waitForPlayerSynchronization() Boolean GrandTheftMultiplayer.Server.Elements.Client client, Int32 timeout Waits until the entity is known to the specified client. Returns whether the synchronization was successful within the timeout duration or not. Note above applies to this method too. Default timeout = 1000ms (Version 0.1.7)