natives icon indicating copy to clipboard operation
natives copied to clipboard

Native type declarations

Open Felipellira opened this issue 1 year ago • 1 comments

The packages:

https://www.npmjs.com/package/@citizenfx/client https://www.npmjs.com/package/@citizenfx/server

aren't open source, so i can't contribute to fix some declarations

to be more precise the native DrawMarker should accept some parameters value as NULL but it's only accepting strings

textureDict: A texture dictionary to draw the marker with, or NULL. Example: 'GolfPutting' textureName: A texture name in textureDict to draw the marker with, or NULL. Example: 'PuttingMarker'

Current declaration

declare function DrawMarker(_type: number, posX: number, posY: number, posZ: number, dirX: number, dirY: number, dirZ: number, rotX: number, rotY: number, rotZ: number, scaleX: number, scaleY: number, scaleZ: number, red: number, green: number, blue: number, alpha: number, bobUpAndDown: boolean, faceCamera: boolean, p19: number, rotate: boolean, textureDict: string, textureName: string, drawOnEnts: boolean): void;

Correct declaration

declare function DrawMarker(_type: number, posX: number, posY: number, posZ: number, dirX: number, dirY: number, dirZ: number, rotX: number, rotY: number, rotZ: number, scaleX: number, scaleY: number, scaleZ: number, red: number, green: number, blue: number, alpha: number, bobUpAndDown: boolean, faceCamera: boolean, p19: number, rotate: boolean, textureDict: string | null, textureName: string | null, drawOnEnts: boolean): void;

Felipellira avatar Jan 06 '24 12:01 Felipellira

These NPM packages are generated automatically from the data in this repo. You can pass empty strings instead of nulls, it should work in the same way.

Disquse avatar Jan 06 '24 18:01 Disquse