Jump to content

Recommended Posts

Posted (edited)

Всем привет! Столкнулся с проблемой в Marker::setColor или getColor, пожалуйста, объясните как у конкретного маркера изменить цвет с помощью этого метода, когда цвет у маркера уже задан вот так? (Заранее спасибо) =>

mp.markers.new(1, new mp.Vector3(-427.517, 1123.620, 325.8544), 1,
{
    direction: new mp.Vector3(-427.517, 1123.620, 325.8544),
    rotation: 0,
    color: [ 212, 83, 0, 255],
    visible: true,
    dimension: 0
});

Я новичок в JS и NodeJS, и без пояснений не могу понять как это работает).

Edited by cheeck
  • 2 weeks later...
Posted

let myMarker = mp.markers.new(1, new mp.Vector3(-427.517, 1123.620, 325.8544), 1, { direction: new mp.Vector3(-427.517, 1123.620, 325.8544), rotation: 0, color: [ 212, 83, 0, 255], visible: true, dimension: 0 });

myMarker.getColor(); 

myMarker.setColor(r, g, b, a);

Вот как можно обратиться к уже созданному маркеру.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...