i,xAhmed Posted October 25, 2013 Share Posted October 25, 2013 آلسلآم عليكم عندي تاج بس آبيه اذا دخل واحد ويحمل عنده ابي يجي عند نكه Downloader بالتاج كود آلتآج = exports.scoreboard:addScoreboardColumn('tag') addEventHandler("onPlayerChat",root, function (msg,type) local name = getElementData(source,"tag") or getPlayerName(source) local acc = getAccountName(getPlayerAccount(source)) if ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("Console")) ) then cancelEvent() outputChatBox("[ Server Owner ] " .. name .. " : #ffffff" .. msg,root, math.random(0,255), math.random(0,255), math.random(0,255), true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("Admin")) ) then cancelEvent() outputChatBox("#ff0000* [ Admin ]" .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("Head.Admin")) ) then cancelEvent() outputChatBox("#ff0000* [ Head.Admin ]" .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("Big.Admin")) ) then cancelEvent() outputChatBox("#ff0000* [ Big.Admin ]" .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("SuperModerator")) ) then cancelEvent() outputChatBox("#00ff00* [ SuperModerator ] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 1")) ) then cancelEvent() outputChatBox("#330033* [ʟɛʋɛʟ.1] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 2")) ) then cancelEvent() outputChatBox("#7D1B7E* [ʟɛʋɛʟ.2] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 3")) ) then cancelEvent() outputChatBox("#827B60* [ʟɛʋɛʟ.3] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 4")) ) then cancelEvent() outputChatBox("#E78A61* [ʟɛʋɛʟ.4] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 5")) ) then cancelEvent() outputChatBox("#15317E* [ʟɛʋɛʟ.5] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("Moderator")) ) then cancelEvent() outputChatBox("#0069c7* [ Moderator ] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("V.I.P")) ) then cancelEvent() outputChatBox("#999999* [ V.I.P ] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 ) then cancelEvent() outputChatBox("" .. name .. " : #ffffff" .. msg,root,255,0,0,true) end end ) Link to comment
فاّرس Posted October 25, 2013 Share Posted October 25, 2013 onPlayerJoin setElementData getElementData اظن في موضوع انطرح دور له Link to comment
i,xAhmed Posted October 25, 2013 Author Share Posted October 25, 2013 onPlayerJoin setElementData getElementData اظن في موضوع انطرح دور له يب جربت الي بالموضوع بس مآنفع Link to comment
فاّرس Posted October 25, 2013 Share Posted October 25, 2013 (edited) جرب كذا, -- Client Side # addEventHandler('onClientResourceStart',resourceRoot,function() setElementData(localPlayer,'Finish',true) end ) -- Server Side # exports.scoreboard:addScoreboardColumn('tag') addEventHandler("onPlayerChat",root, function (msg,type) if type == 0 then if getElementData(source,'Finish') == true then local name = getElementData(source,"tag") or getPlayerName(source) local acc = getAccountName(getPlayerAccount(source)) if ( isObjectInACLGroup("user." .. acc,aclGetGroup("Console")) ) then cancelEvent() outputChatBox("[ Server Owner ] " .. name .. " : #ffffff" .. msg,root, math.random(0,255), math.random(0,255), math.random(0,255), true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("Admin")) ) then cancelEvent() outputChatBox("#ff0000* [ Admin ]" .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("Head.Admin")) ) then cancelEvent() outputChatBox("#ff0000* [ Head.Admin ]" .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("Big.Admin")) ) then cancelEvent() outputChatBox("#ff0000* [ Big.Admin ]" .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("SuperModerator")) ) then cancelEvent() outputChatBox("#00ff00* [ SuperModerator ] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 1")) ) then cancelEvent() outputChatBox("#330033* [ʟɛʋɛʟ.1] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 2")) ) then cancelEvent() outputChatBox("#7D1B7E* [ʟɛʋɛʟ.2] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 3")) ) then cancelEvent() outputChatBox("#827B60* [ʟɛʋɛʟ.3] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 4")) ) then cancelEvent() outputChatBox("#E78A61* [ʟɛʋɛʟ.4] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 5")) ) then cancelEvent() outputChatBox("#15317E* [ʟɛʋɛʟ.5] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("Moderator")) ) then cancelEvent() outputChatBox("#0069c7* [ Moderator ] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("V.I.P")) ) then cancelEvent() outputChatBox("#999999* [ V.I.P ] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( isObjectInACLGroup("user." .. acc,aclGetGroup("Eveyone")) ) then cancelEvent() outputChatBox("" .. name .. " : #ffffff" .. msg,root,255,0,0,true) end else cancelEvent() local name = getElementData(source,"tag") or getPlayerName(source) outputChatBox('* Downloader =>'..name..' : '..msg,root,255,0,0,true) end end end ) Edit # > cancelEvent() Edited October 26, 2013 by Guest Link to comment
кιηg-αвα∂у Posted October 25, 2013 Share Posted October 25, 2013 Client Side Timer = setTimer( function() if not isTransferBoxActive() then setElementData(localPlayer,'DownloadFinish',true) if isTimer(Timer) then killTimer(Timer) end end end,1000,0) Server Side exports.scoreboard:addScoreboardColumn('tag') addEventHandler("onPlayerChat",root, function (msg,type) local name = getElementData(source,"tag") or getPlayerName(source) local acc = getAccountName(getPlayerAccount(source)) if ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("Console")) ) then cancelEvent() outputChatBox("[ Server Owner ] " .. name .. " : #ffffff" .. msg,root, math.random(0,255), math.random(0,255), math.random(0,255), true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("Admin")) ) then cancelEvent() outputChatBox("#ff0000* [ Admin ]" .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("Head.Admin")) ) then cancelEvent() outputChatBox("#ff0000* [ Head.Admin ]" .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("Big.Admin")) ) then cancelEvent() outputChatBox("#ff0000* [ Big.Admin ]" .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("SuperModerator")) ) then cancelEvent() outputChatBox("#00ff00* [ SuperModerator ] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 1")) ) then cancelEvent() outputChatBox("#330033* [ʟɛʋɛʟ.1] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 2")) ) then cancelEvent() outputChatBox("#7D1B7E* [ʟɛʋɛʟ.2] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 3")) ) then cancelEvent() outputChatBox("#827B60* [ʟɛʋɛʟ.3] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 4")) ) then cancelEvent() outputChatBox("#E78A61* [ʟɛʋɛʟ.4] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("lvl 5")) ) then cancelEvent() outputChatBox("#15317E* [ʟɛʋɛʟ.5] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("Moderator")) ) then cancelEvent() outputChatBox("#0069c7* [ Moderator ] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 and isObjectInACLGroup("user." .. acc,aclGetGroup("V.I.P")) ) then cancelEvent() outputChatBox("#999999* [ V.I.P ] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) elseif ( type == 0 ) then if ( getElementData(source,'DownloadFinish') ) then cancelEvent() outputChatBox("" .. name .. " : #ffffff" .. msg,root,255,0,0,true) else cancelEvent() outputChatBox("* [ Downloader ] " .. name .. " : #ffffff" .. msg,root,255,0,0,true) end end end ) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now