Skip to content

Commit f63bf2f

Browse files
committed
Update to mtasa-lua-types 0.6.0
Closes mtasa-typescript#31
1 parent 81821e9 commit f63bf2f

File tree

3 files changed

+15
-30
lines changed

3 files changed

+15
-30
lines changed

package-lock.json

+3-24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"dependencies": {
88
"lua-types": "^2.10.1",
9-
"mtasa-lua-types": "^0.5.0",
9+
"mtasa-lua-types": "^0.6.0",
1010
"mtasa-lua-utils": "^0.1.11"
1111
},
1212
"devDependencies": {

src/example/client.ts

+11-5
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@ import { addEventHandler } from 'mtasa-lua-types/types/mtasa/client/function/eve
66
import { outputChatBox } from 'mtasa-lua-types/types/mtasa/client/function/output';
77
import { getTime } from 'mtasa-lua-types/types/mtasa/client/function/world';
88
import { resourceRoot } from 'mtasa-lua-types/types/mtasa/client/variables';
9+
import { EventNames } from 'mtasa-lua-types/types/mtasa/client/event/all_event_names';
10+
import { Event } from 'mtasa-lua-types/types/mtasa/client/mtasa';
911

10-
addEventHandler('onClientResourceStart', resourceRoot, function() {
11-
const [hours, minutes] = getTime();
12+
addEventHandler<Event.OnClientResourceStart>(
13+
EventNames.OnClientResourceStart,
14+
resourceRoot,
15+
function () {
16+
const [hours, minutes] = getTime();
1217

13-
outputChatBox('TypeScript Resource Boilerplate works.' +
14-
`In-game time: ${hours}:${minutes}`);
15-
});
18+
outputChatBox('TypeScript Resource Boilerplate works.' +
19+
`In-game time: ${hours}:${minutes}`);
20+
},
21+
);

0 commit comments

Comments
 (0)