Hello Onset(tlers),
Here is a simple Codesnipped to call a lua function with a simple HTML Page.
LUA(Client)-File:
It's a simple example but I think it is enough to understand it.
Here is a simple Codesnipped to call a lua function with a simple HTML Page.
HTML Code:
<html> <head> <script type="text/javascript"> function addChat(text) { CallEvent("addChatLUA",text); } </script> </head> <body> <button onclick="addChat('Hello World')">Click me to say Hello World in the chat</button> </body> </html>
Code:
AddEvent("addChatLUA", function(text) AddPlayerChat(text) end)
It's a simple example but I think it is enough to understand it.
Comment