- 443
- 655
Описание: Получаем полную информацию про TextDraw (как при хуке в SAMP.Lua)
Пример использования:
Lua:
function onRecvRpc(id, data, size)
if id == 134 then
local bs = bitStreamInit(data, size)
local data = {}
local textdrawId = bitStreamReadWord(bs)
data.flags = bitStreamReadByte(bs)
data.letterWidth = bitStreamReadFloat(bs)
data.letterHeight = bitStreamReadFloat(bs)
data.letterColor = bitStreamReadDWord(bs)
data.lineWidth = bitStreamReadFloat(bs)
data.lineHeight = bitStreamReadFloat(bs)
data.boxColor = bitStreamReadDWord(bs)
data.shadow = bitStreamReadByte(bs)
data.outline = bitStreamReadByte(bs)
data.backgroundColor = bitStreamReadDWord(bs)
data.style = bitStreamReadByte(bs)
data.selectable = bitStreamReadByte(bs)
local vx = bitStreamReadFloat(bs)
local vy = bitStreamReadFloat(bs)
data.position = {x=vx,y=vy}
data.modelId = bitStreamReadWord(bs)
local vx = bitStreamReadFloat(bs)
local vy = bitStreamReadFloat(bs)
local vz = bitStreamReadFloat(bs)
data.rotation = {x=vx,y=vy,z=vz}
data.zoom = bitStreamReadFloat(bs)
data.color = bitStreamReadDWord(bs)
local l = bitStreamReadWord(bs)
if l <= 0 then
data.text = ''
else
data.text = bitStreamReadString(bs, l)
end
onShowTextDraw(textdrawId,data)
end
end
Lua:
function onShowTextDraw(id,data)
printLog(tostring(id))
printLog(tostring(data.text))
end