SixL client API / dummies / DummyEntityMp
Interface: DummyEntityMp
A dummy entity of the server's scripts: a type and shared variables, no position.
Remarks
Partial: given by the server to every client, with its variables before dummyEntityCreated. Not yet confirmed in the game.
Example
mp.events.add('dummyEntityCreated', (dummyType, dummy) => mp.console.logInfo(String(dummy.getVariable('owner'))));
Properties
dummyType
readonlydummyType:number
The dummy's type: the number the server's script made it with.
Remarks
Partial: not yet confirmed in the game.
Example
if (dummy.dummyType === 42) { }
id
readonlyid:number
The dummy's id: the server's (the same as remoteId).
Remarks
Partial: not yet confirmed in the game.
Example
const id = dummy.id;
remoteId
readonlyremoteId:number
The server's id of the dummy.
Remarks
Partial: not yet confirmed in the game.
Example
const id = dummy.remoteId;
type
readonlytype:string
Always 'dummy'.
Remarks
Partial: not yet confirmed in the game.
Example
if (dummy.type === 'dummy') { }
Methods
getVariable()
getVariable<T>(value):T
A shared variable the server's script set on the dummy.
Type Parameters
T
T = any
Parameters
value
string
The variable's name.
Returns
T
Its value, or undefined when the server never set it.
Remarks
Partial: the value the server sent last. Not yet confirmed in the game.
Example
const owner = dummy.getVariable('owner');