Skip to content

Native type declarations #974

@Felipellira

Description

@Felipellira

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions