ragempcommunity / ragemp-types

Community-driven type definitions for RAGE Multiplayer
https://rage.mp/
MIT License
62 stars 35 forks source link

Client-Side set Player Alpha #21

Closed Mollmie closed 2 years ago

Mollmie commented 2 years ago

Hey,

Im using in my Client Script set Alpha for a Player. Like this: mp.players.local.setAlpha(0);

In your Types i must set one more Argument: Like this: setAlpha(alpha : number, skin : boolean);

But when i set the boolean, than i get a exception / error.

It is also described here: https://wiki.rage.mp/index.php?title=Entity::setAlpha

Can you make the boolean arg optional?

Thx for your work. :)

leonardssh commented 2 years ago

Hey, it was fixed in https://github.com/LeonardSSH/ragemp-types/commit/e60055514b41690049f6aafdfb8454a9491b81aa, in order to use the fixed version, please use the nighly build:

# With npm
> npm i --save-dev github:leonardssh/ragemp-types#types-client

# With yarn
> yarn add -D github:leonardssh/ragemp-types#types-client

# With pnpm
> pnpm add -D github:leonardssh/ragemp-types#types-client

Same for the other sides. 😄

Mollmie commented 2 years ago

It Works! Tank you. <3