Print in server consol

Hello,

i try to use print(“hello”) in a server side event and call It in a client script but nothing appear in console !

1 Like

Please provide the used code as well as your resource manifest file.

fxmanifest.lua

fx_version 'cerulean'

game 'gta5'

client_scripts {"client.lua"}
server_scripts {"server.lua"}

client.lua


RegisterCommand("hello",function(source,args)
   TriggerServerEvent("printHello")
end,false)

server.lua

RegisterNetEvent("printHello")
AddEventHandler("printHello",function()
   print(hello)
end)
1 Like

You’re not printing a string, you’re printing a null variable which leads to nothing being printed.
Use:

print("hello") -- The use of "" means it's a string

Oups my misstake! But nothing change after restart the ressource

I tried the exact same code and it works.
image

Ok well i restart my server

Ok it’s working now …

Thanks for all