RegisterCommand("createcar",function(source,args)
local coords = GetEntityCoords(GetPlayerPed(-1))
print(coords.x)
print(coords.y)
print(coords.z)
print(args[1])
print(type(args[1]))
local testVehicle = CreateVehicle("baller",coords.x,coords.y,coords.z,args[1],false,true)
Citizen.CreateThread(function()
local time = 30 -- 30 倒计时
while (time ~= 0) do -- 大于0循环
Wait( 1000 ) -- 等待一秒
time = time - 1
-- 每过一秒-1
end
--执行完timer回收车辆和线程
DeleteVehicle(testVehicle)
TerminateThisThread()
end)
end)