• 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!

Windows Zombie Event 999 players

kozmo

Member
Joined
Jan 30, 2009
Messages
433
Solutions
2
Reaction score
22
So i am trying to get the zombie event to start on its own i put the talk action script into global events and set the interval but the only problem is, its asking for 999 players before it can start is there anyway i can fix this threw this script?

Code:
function onThink(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("Zombie Arena Event started.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Zombies event started.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cannot start Zombies event. There is no players on arena.")
end
else
if(param ~= '' and tonumber(param) > 0) then
setZombiesEventPlayersLimit(tonumber(param))
end
removeZombiesEventBlockEnterPosition()
doSetStorage(ZE_STATUS, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Event started.")
doPlayerBroadcastMessage(cid, "Zombie Arena Event teleport is opened. We are waiting for " .. getZombiesEventPlayersLimit() - players_on_arena_count .. " players to start.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Zombies event is already running.")
end
return true
end
 
server/data/zombie_system.lua
on zombie_system.lua
Code:
--players variables
ze_join_storage = 1000 --player join storage
ze_min_players = 1 --min players needed when time runout
ze_max_players = 20 --max players to join
ze_trophy = 7369 --trophy id
ze_trophy_desc =  "has won the Zombie Event." --winner description on the trophy
 
I should have mentioned that ZE_DEFAULT_NUMBER_OF_PLAYERS = 5 is already set to 2 players but for some reason asks for 999 when i use that script in global events that is meant for talkactions.
 
Last edited:
I am getting this Error message.

[Error- GlobalEvent Interface]
data/globalevents/scripts/zombie_autostart.lua:onThink
Description:
<luaDoPlayerSendTextMessage> Player Not Found

[Error- GlobalEvent Interface]
data/globalevents/scripts/zombie_autostart.lua:onThink
Description:
<luaGetPlayerFlagValue> Player Not Found
 
Back
Top