Postado Novembro 24, 2014 10 anos Antes de ler quero deixar um aviso "não alterei nada no script apenas copiei de um site e colei aqui " se caso não funcionar não sei como posso ter ajudar, sobre os creditos no website está uma briga entre o Summ e o Danger II pelos direitos/base do script.... Já existem alguns sistemas do elenco ao vivo lançado, mas um monte deles não suportam TFS 1.0 Fonte ou ter alguns bugs conhecidos que são: Os espectadores (pessoas que está assistindo o elenco) não pode ver a mana e vida atualização (descendente e ascendente). A experiência eo nível não vai subir. Não é possível ver elenco do proprietário do bps, e quando você pode ver, apenas um bp é mostrado, não é possível abrir mais de um. No elenco de bate-papo, o nome do proprietário deste elenco na mesma cor dos telespectadores, e o nível na frente, como este :: Usuário [254]: oi direito seria assim: Usuário: Oi No elenco de bate-papo não mostram que enterend, e que deixou o canal. Ex .: 14:24 Spectator 337 entrou no canal. e 14:24 Spectator 294 deixou o canal. Este Sistema Elenco vivo suporta: Todas as informações jogador são possíveis para ver em tempo real para Viewer. O Bps que o jogador está aberto parecem abertos quando o espectador abrir o elenco, não exigindo que o jogador para fechar e abrir novamente para que o espectador pode ver o seu bp, além disso, existe a possibilidade de ver quantos bps é possível. O bate-papo é perfeito (sem irregularidades já referido). Só tenho dois talkaction ! elenco <--- que abre o elenco, e fecha quando aberto e ! password elenco <--- que abre o elenco com a senha "password". A vantagem de ter apenas talkaction isso é para evitar erros e depura. Você vai encontrar o código-fonte aqui:protocollogin.cpp:http://pastebin.com/2sTiw62ggame.cpp:http://pastebin.com/1XiL158Sgame.h:http://pastebin.com/HedNeanMluascript.cpp:http://pastebin.com/A5ZHQkQJluascript.h:http://pastebin.com/q1GwtdgJplayer.cpp:http://pastebin.com/n8VZtYi0player.h:http://pastebin.com/ftDeDPZUprotocolgame.cpp:http://pastebin.com/Kngu4x4Zprotocolgame.h:http://pastebin.com/bEQGkXGMchat.cpp:http://pastebin.com/4N5QA4ftconst.h:http://pastebin.com/ePzK5uzkiologindata.cpp:http://pastebin.com/xsuvHz7hdata/talkactions/talkactions.xml <talkaction words="!cast" script="cast.lua"/> data/talkactions/cast.lua function onSay(cid, words, param, channel) local player = Player(cid) local playerGuid = player:getGuid() local tmp = param:split(", ") if not(tmp[1]) then return doPlayerPopupFYI(cid,"Params:\n\nTurn the cast on: '!cast on'\n\nTurn the cast off: '!cast off'\n\nSet a cast password: '!cast password,YourPassword'\n\nSet a description: '!cast,desc,YourDescription'\n\nBan a viewer: '!cast ban,ViewerName'\n\nUnban a viwer: '!cast unban,ViewerName'\n\nBan list: '!cast bans'\nMute a viewer: '!cast mute,ViewerName'\n\nUnmute a viewer: '!cast unmute,ViewerName'\n\nMute list: '!cast mutes'\n\nList of viewers: '!cast viewers'\n\nCast status: '!cast status'") end if tmp[1] == "on" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast has started.") doPlayerSetCastState(cid, true) player:save() --[[elseif param == "" then if getPlayerCast(cid).status == false then doPlayerSetCastState(cid, true) else doPlayerSetCastState(cid, false) end return true;]]-- elseif tmp[1] == "off" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast has ended.") doPlayerSetCastState(cid, false) player:save() elseif isInArray({"pass", "password", "p"}, tmp[1]) then if not(tmp[2]) then return doPlayerSendCancel(cid, "You need to set a password") end if tmp[2]:len() > 10 then return doPlayerSendCancel(cid, "The password is too long. (Max.: 10 letters)") end if tmp[2] == "off" then doPlayerSetCastPassword(cid, "") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast password has been removed.") db.query('UPDATE `players` SET `castPassword` = "0" WHERE `id` = ' .. player:getGuid()) else doPlayerSetCastPassword(cid, tmp[2]) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast password has been changed to: "..tmp[2]) db.query('UPDATE `players` SET `castPassword` = "1" WHERE `id` = ' .. player:getGuid()) end elseif isInArray({"desc", "description", "d"}, tmp[1]) then local d = param:gsub(tmp[1]..(tmp[2] and " " or ""), "") if not(d) or d:len() == 0 then return doPlayerSendCancel(cid, "You need to specify a description.") end if d:len() > 50 then return doPlayerSendCancel(cid, "The description is too long. (Max.: 50 letters)") end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast description was set to: ") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, d) doPlayerSetCastDescription(cid, d) db.query('UPDATE `players` SET `castDescription` = "' .. d .. '" WHERE `id` = ' .. player:getGuid()) elseif tmp[1] == "ban" then if not(tmp[2]) then return doPlayerSendCancel(cid, "Specify a spectator that you want to ban.") end if doPlayerAddCastBan(cid, tmp[2]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator " .. tmp[2] .. " has been banned.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator " .. tmp[2] .. " could not be banned.") end elseif tmp[1] == "unban" then if not(tmp[2]) then return doPlayerSendCancel(cid, "Specify the person you want to unban.") end if doPlayerRemoveCastBan(cid, tmp[2]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator " .. tmp[2] .. " has been unbanned.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator " .. tmp[2] .. " could not be unbanned.") end elseif param == "bans" then local t = getCastBans(cid) local text = "Cast Bans:\n\n" if t ~= nil then for k, v in pairs(t) do text = text .. "*" .. v.name .. "\n" end end if text == "Cast Bans:\n\n" then text = text .. "No bans." end doShowTextDialog(cid, 2597, text) elseif tmp[1] == "mute" then if not(tmp[2]) then return doPlayerSendCancel(cid, "Specify a spectator that you want to mute.") end if doPlayerAddCastMute(cid, tmp[2]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator " .. tmp[2] .. " has been muted.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator " .. tmp[2] .. " could not be muted.") end elseif tmp[1] == "unmute" then if not(tmp[2]) then return doPlayerSendCancel(cid, "Specify the person you want to unmute.") end if doPlayerRemoveCastMute(cid, tmp[2]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator " .. tmp[2] .. " has been unmuted.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator " .. tmp[2] .. " could not be unmuted.") end elseif param == "mutes" then local t = getCastMutes(cid) local text = "Cast Mutes:\n\n" if t ~= nil then for k, v in pairs(t) do text = text .. "*" .. v.name .. "\n" end end if text == "Cast Bans:\n\n" then text = text .. "No mutes." end doShowTextDialog(cid, 2597, text) elseif param == "viewers" then local t = getCastViewers(cid) local text, count = "Cast Viewers:\n#Viewers: |COUNT|\n\n", 0 if t ~= nil then for _,v in pairs(t) do count = count + 1 text = text .. "*" .. v.name .."\n" end end if text == "Cast Viewers:\n#Viewers: |COUNT|\n\n" then text = "Cast Viewers:\n\nNo viewers." end text = text:gsub("|COUNT|", count) doShowTextDialog(cid, 2597, text) elseif param == "status" then local t, c = getCastViewers(cid), getPlayerCast(cid) local count = 0 for _,v in pairs(t) do count = count + 1 end doShowTextDialog(cid, 2597, "Cast Status:\n\n*Viewers:\n " .. count .. "\n*Description:\n "..(c.description == "" and "Not set" or c.description).."\n*Password:\n " .. (c.password == "" and "Not set" or "Set - '"..c.password.."'")) elseif param == "upddxfggfate" then return doPlayerSendCancel(cid, "Sorry this option is disabled"); --[[ if getPlayerStorageValue(cid, 656544) > os.time() then return doPlayerSendCancel(cid, "You used this command lately. Wait: " .. (getPlayerStorageValue(cid, 656544)-os.time()) .. " sec.") end player:save() doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The cast settings have been updated.") doPlayerSetStorageValue(cid, 656544, os.time()+60) ]]-- end player:save() return true end Em seu banco Adiciona: `cast` tinyint(4) NOT NULL DEFAULT '0', `castViewers` int(11) NOT NULL DEFAULT '0', `castDescription` varchar(255) NOT NULL, `castPassword` int(11) NOT NULL DEFAULT '0', Depois de ter implented os códigos que você vai notar que funciona perfeito. Editado Novembro 24, 2014 10 anos por KekezitoLHP (veja o histórico de edições)
Postado Fevereiro 5, 2015 10 anos Você testou o código ? porque no próprio tutorial do pastebin tem erro, Sem contar que esse sistema esta longe se ser 100% seguro. O mesmo BananaFight, mais com um novo Nick. Abra sua mente, sangue suga não vive sem um hospedeiro, Não faça script para os outros, ensine-os a fazer.
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.