EXECUTE_COMMAND
Depending on your use case you may need to use `add_acl resource.<your_resource_name> command.<command_name> allow` to use this native in your resource.
CFX
Signature
lua
ExecuteCommand(commandString)
-- returns voidParameters
| Name | Type | Description |
|---|---|---|
| char* | — |
Usage
Named call
ExecuteCommand(commandString)InvokeNative
Citizen.InvokeNative(0x561C060B, commandString)lua 1
Citizen.CreateThread(function()
-- stop the server after 1 minute
Citizen.Wait(60000)
ExecuteCommand("quit Shortlived")
end)Details
- Hash
- API set
- Source
- cfx
Source: cfx
