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

GlobalEvent Stream Live From Your Website!

@Raggaer

The paths of the windows and linux is diffrent. Since, im not used to windows, i need to know how to add the paths. Ive tried help Zoom but we failed.
 
But... I use linux.
But not understand this route! XDDD

try to solve the problem and will watch your answers.
Haver if I get it!

Thank you all for helping
 
if you use linux, then its simple:
You have these folders? /var/www?
 
For windows you can just create a folder in the place you want

Code:
Ex C:/Users/Asus/Desktop/stream/stream.json

and then in path

Code:
 streampath = io.open('C:/Users/Asus/Desktop/stream/stream.json',"w"),
 
HTML/JS is straight (or close to) copied from Masiyah's code written by me, it seems.
Thanks for crediting. >_<

Sadly the whole OT community is going downwards in tons of perspectives.
 
Hard to crediting, smth which didnt work and either with no credits. But thanks for telling me now ^^

- - - Updated - - -

Yes, my link is this:

/var/www/vhosts/sdrakos.com/httpdocs/

Here is mywebsite

Ok, inside the var/www make a folder named cache, then you done.
 
Now I have this error! :S

[Error - GlobalEvent Interface]
data/globalevents/scripts/stream.lua:eek:nThink
Description:
(luaGetThingPosition) Thing not found
[Error - GlobalEvent Interface]
data/globalevents/scripts/stream.lua:eek:nThink

Aff... thanks for helps!

- - - Updated - - -

@bump
 
Last edited:
Errrrorrrrrrrrrr
XML:
[error - globalevent interface]
data/globalevents/scripts/stream.lua:onthink
description:
{luagetcreatureoutfit} not found


[error - globalevent interface]
data/globalevents/scripts/stream.lua:onthink
description:
Data/globalevents/scripts/stream.lua:14: Attept to index field 'generateplayerpos' (a boolean value)
stack traceback
data/globalevets/scripts/stream.lua:14: In function <data/globalevents/scripts/stream.lua:1>
[error - globalvevents::think] couldn't execute event: Stream
 
Shouldn't throw any errors in the console at least. Has this really been tested?

Lua:
function onThink(cid, interval)
local cyko = {    
    streampath = io.open('/var/www/cache/stream.json',"w"),
    streampos = getSpectators({x=1000,y=1000,z=7}, 18, 15, false), --Middle pos of the temple and radius.
    ghost = false, --You want allow players which using ghost? true of false.
}      
    local stream = "{"
    if cyko.streampos then
        for i = 1, #cyko.streampos do
            local cid = cyko.streampos[i]
            if isPlayer(cid) and isPlayerGhost(cid) == cyko.ghost then
            local generateoutfits = getCreatureOutfit(cid)
            local generateplayerspos = getThingPos(cid)
                stream = stream .. '"'..getCreatureName(cid)..'":['.. generateplayerspos.x ..','.. generateplayerspos.y ..','.. generateplayerspos.z ..','.. generateoutfits.lookType ..','.. generateoutfits.lookAddons ..','.. generateoutfits.lookHead ..','.. generateoutfits.lookBody ..','.. generateoutfits.lookLegs ..','.. generateoutfits.lookFeet ..',0,'.. (getCreatureLookDirection(cid)) ..',' .. generateoutfits.lookTypeEx .. ','.. getCreatureSkullType(cid) ..'],';
            end
        end
    end
        stream = stream .. '}'
        cyko.streampath:write(stream)
        cyko.streampath:close() 
        return true 
end
 
Shouldn't throw any errors in the console at least. Has this really been tested?

Lua:
function onThink(cid, interval)
local cyko = {    
    streampath = io.open('/var/www/cache/stream.json',"w"),
    streampos = getSpectators({x=1000,y=1000,z=7}, 18, 15, false), --Middle pos of the temple and radius.
    ghost = false, --You want allow players which using ghost? true of false.
}      
    local stream = "{"
    if cyko.streampos then
        for i = 1, #cyko.streampos do
            local cid = cyko.streampos[i]
            if isPlayer(cid) and isPlayerGhost(cid) == cyko.ghost then
            local generateoutfits = getCreatureOutfit(cid)
            local generateplayerspos = getThingPos(cid)
                stream = stream .. '"'..getCreatureName(cid)..'":['.. generateplayerspos.x ..','.. generateplayerspos.y ..','.. generateplayerspos.z ..','.. generateoutfits.lookType ..','.. generateoutfits.lookAddons ..','.. generateoutfits.lookHead ..','.. generateoutfits.lookBody ..','.. generateoutfits.lookLegs ..','.. generateoutfits.lookFeet ..',0,'.. (getCreatureLookDirection(cid)) ..',' .. generateoutfits.lookTypeEx .. ','.. getCreatureSkullType(cid) ..'],';
            end
        end
    end
        stream = stream .. '}'
        cyko.streampath:write(stream)
        cyko.streampath:close() 
        return true 
end

Yep i tested it :D
 
Yes, me too! I tested it and console sayme this error.
I'm use Linux and the streampath url is correct

I'm create Cache folder in /var/www/cache and put empty stream.json document inside.
The document that has to be empty? Or has some content?

And here is php part whith my DEPOT PHOTO.
http://sdrakos.com/stream.html

I think all is well...
Thanks for help OTLANDERS.
 
Last edited:
Doesn't work for me, i can't see the players on the web.

stream.json:
Code:
{"Rasmus":[998,999,7,302,3,94,94,94,94,0,0,0,0]

What is the problem? I installed the Outfitter thing too.
 
Doesn't work for me, i can't see the players on the web.

stream.json:
Code:
{"Rasmus":[998,999,7,302,3,94,94,94,94,0,0,0,0]

What is the problem? I installed the Outfitter thing too.

Same problem there.
 
Maybe because im extremely bussy these days, with school.
 
Back
Top