• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

somebody make this on globalevent work

darknelson

Member
Joined
Jun 19, 2011
Messages
190
Solutions
1
Reaction score
15
Code:
function onSay(cid, words, param, channel)
  if(getStorage(ZE_STATUS) ~= 2) then
      local players_on_arena_count = #getZombiesEventPlayers()
      if(param == 'force') then
        if(players_on_arena_count > 0) then
            setZombiesEventPlayersLimit(players_on_arena_count  )
            addZombiesEventBlockEnterPosition()
            doSetStorage(ZE_STATUS, 2)
            doBroadcastMessage("ZombieEvent A Comenzado!.")
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "ZombieEvent A Comenzado!.")
        else
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "No Se Puede Iniciar, No hay suficientes Players")
        end
      else
        if(param ~= '' and tonumber(param) > 0) then
            setZombiesEventPlayersLimit(tonumber(param))
        end
        removeZombiesEventBlockEnterPosition()
        doSetStorage(ZE_STATUS, 1)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Empezo el Evento.")
        doPlayerBroadcastMessage(cid, "ZombieEvent Corriendo, Gana y Sube 25 Levels, Requerimos " .. getZombiesEventPlayersLimit() - players_on_arena_count .. " players para empezar.")
      end
  else
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "El evento ya esta corriendo.")
  end
  return true
end


If someone can make it work in a globalevent interval execution with player start on 2, please
 
The script you posted seems to miss a few vital things like a table for the following line:
Code:
#getZombiesEventPlayers()
Also what is
Code:
ZE_STATUS

Provide more information and all parts that are connected to the script and you will recieve help.
 
The script you posted seems to miss a few vital things like a table for the following line:
Code:
#getZombiesEventPlayers()
Also what is
Code:
ZE_STATUS

Provide more information and all parts that are connected to the script and you will recieve help.

ZE_STATUS is hes storage from config. Nothing to care about i think :p
 
Code:
function onThink(interval, lastExecution)
local players_on_arena_count = #getZombiesEventPlayers()
local time = 5 --in minutes

local function start()
if players_on_arena_count <= 1 then
doBroadcastMessage("Zombie Couldn't Start Because there was few numbers ona rena")
doSetStorage(ZE_STATUS, 0)
addZombiesEventBlockEnterPosition()
return true
end
setZombiesEventPlayersLimit(players_on_arena_count)
addZombiesEventBlockEnterPosition()
doSetStorage(ZE_STATUS, 2)
doBroadcastMessage("Zombie Arena Event started")
return true
end
setZombiesEventPlayersLimit(5)
doBroadcastMessage("Zombie Event Is Waiting For 5 Players To Join.Zombie Will Start In "..time.." Minutes")
removeZombiesEventBlockEnterPosition()
addEvent(start,time*60*1000)
doSetStorage(ZE_STATUS, 1)
return true
end
Code:
<globalevent name="zombiestart" interval="10800" script="zombiestart.lua"/>
 
Back
Top