Ok so, i would like to ask you just 2 questions still about my gamemode developpement :
How can i replace the patern char " and ’ with " and '. Yes i changed the whole chat management, but when you type " or ’ you got Something is creating script errors, because the char is not escaped. So how i can replace it, so it is escaped ?
Is there any way to make ENT:RenderOverride() working, without changing the lua files when you see a NPC.
Indead, i’m making Text rendering above NPC heads (with cam.Start3D2D), but i can’t figure out why RenderOverride is not called when the player don’t see the NPC. You need to force redownload lua files when a player is front of an NPC to have the RenderOverride method called. Any way to fix this ?
In the hope of quicks answers to my questions,
Thanks by advance,
text:gsub( '\\"', '"' ) \\ since you're replacing " with \" here, use ' to open and close the string
text:gsub( "\\'", "'" ) \\ since you're replacing ' with \' here, use " to open and close the string
\\ all string.* functions can be used as metafunctions
text:gsub( [[\"]], '"' )
text:gsub( [[\']], "'" )
If i put ENT:Draw instead of ENT:RenderOverride, nothing, simply nothing is called. The function is no longer called. You can edit lua files, as much times as you want the function is no longer called.
It’s changing with the ENT.Base = on my shared.
“base_entity”, will call the ENT:Draw each frames.
“base_ai”, will never call ENT:Draw.
“base_gmodentity”, not existing on my gamemode’s base.