اكواد لملف lua
--usfull fun
executeBrowserJavascript_= executeBrowserJavascript
function executeBrowserJavascript (br,te)
executeBrowserJavascript_(br,"document.getElementById('Call').innerHTML = '" .. te .. "' ")
end
------Browser Created-------
addEventHandler("onClientBrowserCreated",resourceRoot,function ()
loadBrowserURL(source, "http://mta/local/index.html")
end)
-----gui Create--------
local sW, sH = guiGetScreenSize()
window = guiCreateWindow(10, (sH - 186) / 2, 337, 186, "", false)
guiSetVisible(window , false)
local Name = guiGetBrowser(guiCreateBrowser(4, 23, 323, 34,true,true,false,window))
local Money = guiGetBrowser(guiCreateBrowser(4, 57, 323, 34,true,true,false,window))
----- Send To HTML <span>
function BrowserDocumentReady()
executeBrowserJavascript (Name,'Yor Name ' ..getPlayerName (localPlayer))
executeBrowserJavascript (Money,'Yor Money ' ..getPlayerMoney (localPlayer))
end
----- open Window
bindKey("F1","down",function ( )
guiSetVisible(window,not guiGetVisible(window))
showCursor(guiGetVisible(window))
--- refresh
BrowserDocumentReady()
end)
كود لملف HTML
<span
style=" color:green; font-family: Arial, Helvetica, sans-serif;font-size : 15px"
id="Call"
span/>
سويته لك بحيث يكون سهل عليك تفهمه بابسط طريقه