Перейти к содержанию

Entity::id

Материал из RAGE MP Wiki Archive
Версия от 20:55, 7 июня 2020; imported>ChronosX88
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

Shared
Property

Ошибка создания миниатюры: Не удаётся сохранить эскиз по месту назначения JavaScript

This property is used for getting an entity ID. The ID is a unique identifier for the entity.

Ошибка создания миниатюры: Не удаётся сохранить эскиз по месту назначения A server-side ID is NOT the same as a client-side ID. Use remoteId property if you want it to match the server-side ID.

Getter

  • Int

Example

This event will log to the console the players name and the ID they have been assigned when joining the server.

Server-Side
mp.events.add("playerJoin", (player) => {
	console.log(`${player.name} has joined. [${player.id}]`);
});

See Also