1
0
mirror of https://github.com/citizenfx/cfx-server-data.git synced 2026-05-15 01:42:32 +08:00

runcode: improved UI, in-game support, JS support

This commit is contained in:
blattersturm
2019-10-21 15:04:55 +02:00
Unverified
parent 64a26ad1de
commit 54f75bca86
10 changed files with 702 additions and 57 deletions
+11
View File
@@ -0,0 +1,11 @@
exports('runJS', (snippet) => {
if (IsDuplicityVersion() && GetInvokingResource() !== GetCurrentResourceName()) {
return [ 'Invalid caller.', false ];
}
try {
return [ new Function(snippet)(), false ];
} catch (e) {
return [ false, e.toString() ];
}
});