mirror of
https://github.com/citizenfx/cfx-server-data.git
synced 2025-12-12 06:14:09 +01:00
add runcode resource
This commit is contained in:
7
resources/runcode/runcode_sv.lua
Normal file
7
resources/runcode/runcode_sv.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
RegisterCommand('run', function(source, args, rawCommand)
|
||||
local res, err = RunCode('return ' .. rawCommand:sub(4))
|
||||
end, true)
|
||||
|
||||
RegisterCommand('crun', function(source, args, rawCommand)
|
||||
TriggerClientEvent('runcode:gotSnippet', source, -1, 'return ' .. rawCommand:sub(5))
|
||||
end, true)
|
||||
Reference in New Issue
Block a user