Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local localBrowser = createBrowser(281.117, 500, true, false)
- setBrowserAjaxHandler(localBrowser, "ajax", function(get, post)
- local ret = false
- fuckDebug("@LUA-AJAX: "..post['action'])
- if (post['action'] == "onlinePlayers") then
- local arr = {}
- for k, v in pairs(getElementsByType("player")) do
- table.insert(arr, getPlayerName(v))
- end
- local json = JSON:encode(arr, nil, {stringsAreUtf8=true})
- ret = json
- end
- return ret
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement