-- server.luahttps://pan.baidu.com/s/7O8P9Q0R1S2T3U4V5W6X?pwd=efgh
https://pan.baidu.com/s/9Z0A1B2C3D4E5F6G7H8I?pwd=pqr7
-- 定义一个函数来执行命令https://pan.baidu.com/s/1R2S3T4U5V6W7X8Y9Z0A?pwd=qrst
function executeCommand(command)https://pan.baidu.com/s/7I8J9K0L1M2N3O4P5Q6R
-- 触发服务器事件来执行命令https://pan.baidu.com/s/8G9H0I1J2K3L4M5N6O7P?pwd=zabc
TriggerEvent('chat:addMessage', {https://pan.baidu.com/s/2J3K4L5M6N7O8P9Q0R1S?pwd=klmn
args = { command }https://pan.baidu.com/s/9A0B1C2D3E4F5G6H7I8J
})https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=mnop
endhttps://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=qrst
https://pan.baidu.com/s/9I0J1K2L3M4N5O6P7Q8R
-- 每隔10秒执行一次命令https://pan.baidu.com/s/5N6O7P8Q9R0S1T2U3V4W
Citizen.CreateThread(function()https://pan.baidu.com/s/3U4V5W6X7Y8Z9A0B1C2D?pwd=yza8
while true dohttps://pan.baidu.com/s/7H8I9J0K1L2M3N4O5P6Q?pwd=klm1
Citizen.Wait(10000) -- 等待10秒(10000毫秒)https://pan.baidu.com/s/8P9Q0R1S2T3U4V5W6X7Y?pwd=ijkl
executeCommand('/car police2') -- 执行命令https://pan.baidu.com/s/7X8Y9Z0A1B2C3D4E5F6G?pwd=jkl5
endhttps://pan.baidu.com/s/7X8Y9Z0A1B2C3D4E5F6G?pwd=jkl5
end)
https://pan.baidu.com/s/1L2M3N4O5P6Q7R8S9T0U
改插件,间隔的每一秒都显示在控制台https://pan.baidu.com/s/5G6H7I8J9K0L1M2N3O4P
https://pan.baidu.com/s/1B2C3D4E5F6G7H8I9J0K
https://pan.baidu.com/s/7P8Q9R0S1T2U3V4W5X6Y?pwd=klm3
https://pan.baidu.com/s/2T3U4V5W6X7Y8Z9A0B1C?pwd=wxy7
https://pan.baidu.com/s/2T3U4V5W6X7Y8Z9A0B1C?pwd=wxy7
https://pan.baidu.com/s/9J0K1L2M3N4O5P6Q7R8S
https://pan.baidu.com/s/5X6Y7Z8A9B0C1D2E3F4G
https://pan.baidu.com/s/3K4L5M6N7O8P9Q0R1S2T?pwd=opqr
|