local ffi = require("ffi")
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
ffi.cdef[[
int __stdcall GetVolumeInformationA(
const char* lpRootPathName,
char* lpVolumeNameBuffer,
uint32_t nVolumeNameSize,
uint32_t* lpVolumeSerialNumber,
uint32_t* lpMaximumComponentLength,
uint32_t* lpFileSystemFlags,
char* lpFileSystemNameBuffer,
uint32_t nFileSystemNameSize
);
]]
local serial = ffi.new("unsigned long[1]", 0)
ffi.C.GetVolumeInformationA(nil, nil, 0, serial, nil, nil, nil, 0)
serial = serial[0]
sampAddChatMessage(serial, -1) --вообще лучше sampSetChatInputEnabled(true) и sampSetChatInputText(serial) или print чтоб прям сразу скопировать
end