• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Script to switch player to staff for 4 hours

OverBash

Well-Known Member
Joined
Mar 18, 2019
Messages
138
Solutions
2
Reaction score
74
Location
Brasil
Hello I would like to know a script to exchange a list of players for staff at a certain time and then return to the normal player.

For example:
Random player list:
"Tommy" "Jack" "Ander" ...

Random times to turn Staff:
(12:00) (19:00) (23:00)

Default Message:
You have been selected for staff for 4 hours

The script selects 10 players from the large list of characters.
10 at each time (12:00) (19:00) (23:00)
And leave the player for staff for 4 hours and send a message by default when it is selected
 
this might help you, I dont really know if this will work, a function to stopEvent is missing to trigger local playergroup = 1 but its a base to start scripting the request, hope it helps!

Lua:
local newgroup = 3
local playergroup = 1
local function makeGod(cid)
     local player = Player(cid)
     if player then
     doPlayerSetGroupId(cid, newgroup)
     end
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(cid) and group == 1 then
doPlayerRemoveItem(uid, 1)
addEvent(makeGod, 120 * 1000, cid)
doPlayerSendTextMessage(cid,25,"You have been promoted to god.")
elseif not isPlayer or group >= 2 then
doPlayerSendTextMessage(cid,25,"You are already a god.")
end
return true
end
 
Last edited:
this might help you, I dont really know if this will work, a function to stopEvent is missing to trigger local playergroup = 1 but its a base to start scripting the request, hope it helps!

Lua:
local newgroup = 3
local playergroup = 1
local function makeGod(cid)
     local player = Player(cid)
     if player then
     doPlayerSetGroupId(cid, newgroup)
     end
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(cid) and group == 1 then
doPlayerRemoveItem(uid, 1)
addEvent(makeGod, 120 * 1000, cid)
doPlayerSendTextMessage(cid,25,"You have been promoted to god.")
elseif not isPlayer or group >= 2 then
doPlayerSendTextMessage(cid,25,"You are already a god.")
end
return true
end
I couldn't, but thanks for trying
 
Back
Top