- Joined
- Apr 1, 2012
- Messages
- 1,249
- Solutions
- 71
- Reaction score
- 621
- Location
- Hell
- GitHub
- idontreallywolf
Hello otlanders!
i've found a live stream script in my datapack . I think #Cyko made it.
whatever...
Im getting these errors when i enable it in .xml file.
and .. stream.lua
i've found a live stream script in my datapack . I think #Cyko made it.
whatever...
Im getting these errors when i enable it in .xml file.
Code:
[20/02/2014 17:30:27] [Error - GlobalEvent Interface]
[20/02/2014 17:30:27] data/globalevents/scripts/stream.lua:onThink
[20/02/2014 17:30:27] Description:
[20/02/2014 17:30:27] (luaGetCreatureOutfit) Creature not found
[20/02/2014 17:30:27] [Error - GlobalEvent Interface]
[20/02/2014 17:30:27] data/globalevents/scripts/stream.lua:onThink
[20/02/2014 17:30:27] Description:
[20/02/2014 17:30:27] (luaGetThingPosition) Thing not found
and .. stream.lua
Code:
function onThink(cid, interval)
local cyko = {
streampath = io.open('/xampp/htdocs/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.
generateoutfits = getCreatureOutfit(cid),
generateplayerspos = getThingPos(cid),
}
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
stream = stream .. '"'..getCreatureName(cid)..'":['.. cyko.generateplayerspos.x ..','.. cyko.generateplayerspos.y ..','.. cyko.generateplayerspos.z ..','.. cyko.generateoutfits.lookType ..','.. cyko.generateoutfits.lookAddons ..','.. cyko.generateoutfits.lookHead ..','.. cyko.generateoutfits.lookBody ..','.. cyko.generateoutfits.lookLegs ..','.. cyko.generateoutfits.lookFeet ..',0,'.. (getCreatureLookDirection(cid)) ..',' .. cyko.generateoutfits.lookTypeEx .. ','.. getCreatureSkullType(cid) ..'],';
end
end
end
stream = stream .. '}'
cyko.streampath:write(stream)
cyko.streampath:close()
return true
end
Last edited: