Ex C:/Users/Asus/Desktop/stream/stream.json
streampath = io.open('C:/Users/Asus/Desktop/stream/stream.json',"w"),
Yes, my link is this:
/var/www/vhosts/sdrakos.com/httpdocs/
Here is mywebsite
[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
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
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.