qadr_panel
This resource creates an API to manage your server from admin panel.
local rType = { {data="loginchecker",value = return boolean}, or {data="updateUser", value = return object}, object = { value = string, fieldname = string, playerserverid = integer} or {data="kickedPlayer",value = return object}, object = { playerserverid = number, reason = string} or {data="apikey", value = return string}, string = apikey or {data="tableUpdate", value = return object}, object = { account = string, pass = string, apikey = string, primarykey = string, fieldname = string, value = string, table = string, primarykeydata = string} or {data="createPage", value = return object}, object = { pagename = string, tablename = string, primarykey = string, columun = string} or {data="deletePage", value = return string}, string = tableName or {data="additemtoplayer", value = return object}, object = { playerserverid = integer, itemname = string, itemcount = integer, isItemWasAdded = boolean } or {data="addmoneytoplayer",value = return object}, object = { playerserverid = integer, money = integer, isMoneyWasAdded = boolean } or {data="setfullhp", value = return integer},integer = playerserverid or {data="setPlayerCoords", value = return object}, object = { playerserverid = integer, coords = vector3} } If you want to handle events, use like this to api-server.lua : serverRequestHandler = function(rType) if rType.data == "loginchecker" then print(rType.value) end if rType.data == "updateUser" then print(rType.value.value) print(rType.value.fieldname) print(rType.value.playerserverid) end if rType.data == "kickedPlayer" then print(rType.value.playerserverid) print(rType.value.reason) end if rType.data == "apikey" then print(rType.value) end if rType.data == "tableUpdate" then print(rType.value.account) print(rType.value.pass) print(rType.value.apikey) print(rType.value.primarykey) print(rType.value.fieldname) print(rType.value.value) print(rType.value.table) print(rType.value.primarykeydata) end if rType.data == "createPage" then print(rType.value.pagename) print(rType.value.tablename) print(rType.value.primarykey) print(rType.value.columun) end if rType.data == "deletePage" then print(rType.value) end if rType.data == "additemtoplayer" then print(rType.value.playerserverid) print(rType.value.itemname) print(rType.value.itemcount) print(rType.value.isItemWasAdded) end if rType.data == "addmoneytoplayer" then print(rType.value.playerserverid) print(rType.value.money) print(rType.value.isMoneyWasAdded) end if rType.data == "setfullhp" then print("Healed player server id = "..tostring(rType.value)) end if rType.data == "setPlayerCoords" then print(rType.value.playerserverid) local coords = rType.value.coords print(coords.x, coords.y, coords.z) end end
Last updated