Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: bubbles
1. chat bubbles
Siemka! Mam problem z cbb, a mianowicie wiadomo?? w cbb si? wy?wietla, lecz po ?rodku postaci si? r?wnie? wy?wiwetla
[img]https://cdn.discordapp.com/attachments/803254466010415115/812276571518795786/unknown.png[/img]


Je?li kto? mo?e to prosi?bym o popraw? kodu

[lua]local textsToDraw = {}

local hideown = false
local showtime = 2000
local characteraddition = 100
local maxbubbles = 1
local showthebubbles = true
local dxfont3_SegoeLight = dxCreateFont(":sr-files/fonts/SegoeLight.ttf")

function income(message,messagetype)
if source ~= getLocalPlayer() or not hideown then
if messagetype == 2 then
if getPlayerTeam(source) == getPlayerTeam(getLocalPlayer()) then
addText(source,message,messagetype)
end
else
addText(source,message,messagetype)
end
end
end
addEvent("onChatbubblesMessageIncome",true)
addEventHandler("onChatbubblesMessageIncome",getRootElement(),income)
function addText(source,message,messagetype)
local notfirst = false
for i,v in ipairs(textsToDraw) do
if v[1] == source then
v[4] = v[4] +1
notfirst = true
end
end
local infotable = {source,message,messagetype,0}
table.insert(textsToDraw,infotable)
if not notfirst then
setTimer(removeText,showtime + (tonumber(#message) * 100),1,infotable)
end
end

function removeText(infotable)
...