Using Typescript
Typescript is a really great resource for C# users looking for a similar language for writing client-side resources. Luckily for us there are a few users out there who have created Typescript definitions for the client-side code.
You may obtain them from:
https://github.com/CocaColaBear
Prerequisites
- NodeJS Installed
- General Server Setup Done
Setup
Open Visual Studio Code
Pressing ctrl + ` will open a terminal.
You can install typescript by running the following command:
npm install -g typescript
To verify that you have installed typescript correctly type:
tsc --version
Adding Typescript Definitions
Clientside
npm install -g --save-dev github:CocaColaBear/types-ragemp-c#master
or
npm install -g --save-dev https://github.com/CocaColaBear/types-ragemp-c/tarball/master
Serverside
npm install -g --save-dev github:CocaColaBear/types-ragemp-s#master
If neither of these happen to be working properly you can try removing -g. That's just a global install function.
You can verify if it's working properly by creating a new Typescript file. .ts
Then begin programming by typing:
mp.game
If working properly you will have auto-fill available.