[Preview]
Explanation
Hi everybody
I thought about a script that forces players to be on the server always online
This interesting idea came to my mind and I was able to force players to be on the server all the time
They are on the online server now even when they want to sleep
When they are more online and gain a higher level they can use more server facilities
For example I set that players need to have Level 10 in order to be on the police server
How does it work?
-
When the first player enters the server they are Level 1
-
They have gotten respect when they are on an online server
-
After their respect is completed their level increases
-
You can configure your server according to the level, for example, if the level player is less than 10, can not buy a gun license.
-
You can write the level of the players on the scoreboard. I did this as an example.
renzu_scoreboard.rar (10.5 KB)
( i just added level display this original script is for @Renzuzu)
Config.lua
Config = {}
Config.addrespectamount = 1 -- How much respect when the respect function is runed ** Defualt : 1
Config.addrespecttime = 60 -- Time it take to give all respect ** Defualt : 60 min
Config.antispamtime = 3000 -- Anti-spam system time ** Defualt : 3 sec
Config.removelevelcmd = "removelevel" -- Admin CMD to remove the level of players ** Defualt : removelevel
Config.addlevelcmd = "addlevel" -- Admin CMD to add the level of players ** Defualt : addlevel
Config.statuscmd = "status" -- CMD to see level and respect amount ** Defualt : status
Config.levelupcmd = 'getlevel' -- CMD to level up if respect fulled ** Defualt : getlevel
Config.reqrespect = 5 --- Coefficient of respect requirement for level up Example : if player is level 3 request respect formol ( 3 * 5 = 15 ) and player needed for level up 15 respect
Using Level on other resources
server-side: Mysql connection
local xPlayer = ESX.GetPlayerFromId(source)
local level = MySQL.Sync.fetchAll("SELECT level FROM users WHERE identifier = @identifier", {["@identifier"] = xPlayer.identifier})
level = level[1].level
client-side: exports
local level = exports["ata_level"]:GetLevel()
trigger server call back
ESX.TriggerServerCallback("ata:getlevel", function(output)
if output >= 5 then
print('work')
else
print('not work')
end
end)
readme.lua Read my aid a in it . If you have a problem, contact me.
Download
Get this resource at Tebex
- ESX
- No IP lock
- Source code
- Fully customizable
- Easy install
Check out my other scripts here:




