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