Debug Console / chatMessage for everything

Hello,

I was wondering, if there is any possibility to debug the lua code via the “chatMessage” Event? I can’t figure out, how to display my values etc. somewhere.

Thanks.

Citizen.Trace(“Message”)

Hit F8 ingame to see the console

for server scripts just do print(“Message”) and itll show in server console

4 Likes

Thanks.
I just found a function here, to display nearly everything.

function Chat(t)
	TriggerEvent("chatMessage", '', { 0, 0x99, 255}, "" .. tostring(t))
end
if IsControlPressed(0, "303") then
            Chat("something...")
        end