Jump to content

event system


BonSay~^

Recommended Posts

Posted

Hello I was wondering if anyone has an event script that when you type / irevento goes to a teleport done to such a place and when he dies but can not go back and appear in chat who died

Daqui pra frente vai ser tudo diferente ♫ ♩

Posted

If you meant a simple event warps system, here is it i just made:

local warpsON = false 
local eX, eY, eZ = 0, 0, 0 
local eDim = 336 
  
function startEvent(plr, cmd, ...) 
    setElementDimension(plr, eDim) 
    eX, eY, eZ = getElementPosition(plr) 
    local msg = table.concat({...}, " ") 
    outputChatBox("Event warps are now open, type /ewarp to get to the location.", root, 0, 200, 0) 
    if (msg) and (#msg >= 2) then outputChatBox("Event Message: "..msg, root, 0, 150, 0) end 
    warpsON = true 
end 
addCommandHandler("startevent", startEvent) 
  
function warpPlayers(plr) 
    if (not warpsON) then outputChatBox("There is no event in progress right now!", plr, 200, 0, 0) return end 
    spawnPlayer(plr, eX, eY, eZ) 
    setElementDimension(plr, eDim) 
    outputChatBox("Successfully joined Event!", plr, 0, 200, 0) 
end 
addCommandHandler("ewarp", warpPlayers) 
  
function stopEvent(plr) 
    if (not warpsON) then outputChatBox("There is no event in progress right now!", plr, 200, 0, 0) return end 
    warpsON = false 
    eX, eY, eZ = 0, 0, 0 
    local eventPlrs = getElementsInDimension("player", 336) 
    for k, v in pairs (eventPlrs) do 
        setElementDimension(v, 336) 
        outputChatBox("Event have been cancelled by "..plr, v, 200, 0, 0) 
    end 
    outputChatBox("Successfully stopped Event!", plr, 0, 200, 0) 
end 
addCommandHandler("stopevent", stopEvent) 
  
function getElementsInDimension(theType,dimension) 
    local elementsInDimension = { } 
      for key, value in ipairs(getElementsByType(theType)) do 
        if getElementDimension(value)==dimension then 
        table.insert(elementsInDimension,value) 
        end 
      end 
      return elementsInDimension 
end 

^Sever side code + i grabbed getElementsWithinDimension from wiki's useful functions.

If that didn't worked or you didn't asked something like that, you may tell me in details, i'll try to remake a basic one again.

Posted

You can use my event system i create it with prime for CIT server a long time ago.

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted

This is not a forum requests. If you want someone to make this system of events that you want, you will have to contact a paid scripter

jIcd9sc.png

Not worry about the future. Very soon it will come.

Posted
You can use my event system i create it with prime for CIT server a long time ago.

you can send it to me then

Daqui pra frente vai ser tudo diferente ♫ ♩

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...