ragempcommunity/ragemp-types

Missing Typea and Function

Revalto opened this issue ยท 12 comments

Missing Type

Client-Side:
mp.game.graphics.setLightsState(number, boolean);
mp.game.vehicle.defaultEngineBehaviour = boolean;

It's work in Client-Side!

mp.game.graphics.drawDebugLine(...);

p0 - is not Number - error!

Hey, I don't find anything related to mp.game.graphics.setLightsState.

mp.game.graphics.drawDebugLine seems to be just a debugging function, I don't think it's necessary to add it in types. Also, I can't find anything related to it.


mp.game.vehicle.defaultEngineBehaviour fixed in leonardssh@1a60bd8.

Hey! There is nothing in the documentation about mp.game.graphics.setLightsState, but it works and I use it. If you use a search engine, you can find solutions with this code (link)

You can try this code, it turns off the light on the whole map:

for (let i = 0; i <= 16; i++) {
    mp.game.graphics.setLightsState(i, false);
}

The mp.game.graphics.drawDebugLine function is in the documentation, but it doesn't work, it just throws an error when used

Client-Side:
Also, VehicleMp does not have a setVariable function, perhaps not all EntityMp

TimFL commented

Hey! There is nothing in the documentation about mp.game.graphics.setLightsState, but it works and I use it. If you use a search engine, you can find solutions with this code (link)

You can try this code, it turns off the light on the whole map:

for (let i = 0; i <= 16; i++) {
    mp.game.graphics.setLightsState(i, false);
}

The mp.game.graphics.drawDebugLine function is in the documentation, but it doesn't work, it just throws an error when used

I can confirm that setLightsState is a valid function, I am using it (it doesn't seem to be documented anywhere). The first param equals the lightId (also not documented anywhere), second is whether the light should be disabled or not (e.g. (lightId: 1, disabled: true);

It's effectively a split up "blackout" or turn off artifical lights method, allowing you to only turn of certain light types like lampposts or building lights.

//EDIT: I'm submitting a PR https://github.com/LeonardSSH/ragemp-types/pull/18

Also, do not forget that the setVariable function does not exist in VehicleMp! She needs to be removed

Entity::dist does not exist on the Client-Side, it should be removed!

Missing: mp.game.graphics.set2dLayer
Link: https://wiki.rage.mp/index.php?title=Render_Targets

TimFL commented

Entity::dist does not exist on the Client-Side, it should be removed!

Does this not exist for EntityMp stuff as a whole or does dist exist on a subtype (VehicleMp, ObjectMp etc)? Because then removing is not that easy cause you need to add it to the subtypes.

@leonardssh have all these types been confirmed and added now to the main repo?

Not all of them, I lost track of events here. ๐Ÿ˜… I've to go through them again.

This can be closed.