abo_7mod Posted June 21, 2015 Share Posted June 21, 2015 السلام عليكم ورحمة الله وبركاتهـ .. بغيت اسوي تيمين.. الاول تيم للهجولة والثاني للحرب ابي الفنكشن الي يمنع الكلام في ال teamsay عشان ما يسبون هناك وكذا .. اتمنى انكم فهمتوني والسلام عليكم Link to comment
N3xT Posted June 21, 2015 Share Posted June 21, 2015 onPlayerChatcancelEvent 0: normal message 1: action message (/me) 2: team message Link to comment
Jupi Posted June 21, 2015 Share Posted June 21, 2015 onPlayerChatcancelEvent 0: normal message 1: action message (/me) 2: team message اظن تابل افاده من قبل وش فايدة ذا الرد + انواع الرسائل اللي انت كتبتها موجودة بلويكي Link to comment
abo_7mod Posted June 21, 2015 Author Share Posted June 21, 2015 addEventHandler("onPlayerChat",root, function (msg,type) if (type == 2) then cancelEvent () end end ) كذا ^؟ Link to comment
TAPL Posted June 21, 2015 Share Posted June 21, 2015 addEventHandler("onPlayerChat",root, function (msg,type) if (type == 2) then cancelEvent () end end ) كذا ^؟ يفترض انك تجرب بنفسك قبل ما تسأل Link to comment
N3xT Posted June 21, 2015 Share Posted June 21, 2015 local function playerChat(message, messageType) if messageType == 2 then cancelEvent() end end addEventHandler("onPlayerChat", root, playerChat) Link to comment
TAPL Posted June 21, 2015 Share Posted June 21, 2015 local function playerChat(message, messageType) if messageType == 2 then cancelEvent() end end addEventHandler("onPlayerChat", root, playerChat) ؟abo_7mod ايش الفرق بين كودك و كود Link to comment
abo_7mod Posted June 21, 2015 Author Share Posted June 21, 2015 تمام اشتغل طيب مثلاً كيف اخلي فقط تيم واحد يقدر يتكلم بالتي ساي سويت الكود هذا وما اشتغل addEventHandler("onPlayerChat",root, function (msg,type) if (type == 2) then if (getPlayerTeam(source) ~= "admin") then cancelEvent () end end end) Link to comment
TAPL Posted June 21, 2015 Share Posted June 21, 2015 getPlayerTeam ذا يجيب المنت التيم تحتاج تجيب اسم التيم من الألمنت حق التيم getTeamName ذا الفنكشن يجيب الأسم من المنت التيم Link to comment
abo_7mod Posted June 21, 2015 Author Share Posted June 21, 2015 server.lua:4: Bad argument @ 'getTeamName' [Expected team at argument 1, got player] debug ^ addEventHandler("onPlayerChat",root, function (msg,type) if (type == 2 or type == 1) then if (getTeamName(source) ~= "admin") then cancelEvent () end end end) Link to comment
TAPL Posted June 21, 2015 Share Posted June 21, 2015 getTeamName ذا يجيب اسم التيم من المنت التيم مو المنت اللاعب عشان تجيب المنت التيم الي اللاعب فيه getPlayerTeam يعني لازلت تحتاج Link to comment
abo_7mod Posted June 21, 2015 Author Share Posted June 21, 2015 ما ظنيت اني اقدر اسويها لكن جربت بنفسي , اظن انها خطأ ممكن تساعدني addEventHandler("onPlayerChat",root, function (msg,type) if (type == 2 or type == 1) then if (getPlayerTeam(source)(getTeamName(source)) ~= "admin") then cancelEvent () end end end) Link to comment
TAPL Posted June 21, 2015 Share Posted June 21, 2015 addEventHandler("onPlayerChat", root, function(msg, type) if (type == 2 or type == 1) then if (getTeamName(getPlayerTeam(source)) ~= "admin") then cancelEvent() end end end) Link to comment
abo_7mod Posted June 21, 2015 Author Share Posted June 21, 2015 تمّت الافادة اخوي تابل على الاقل حاولت بـــ نفسي .. بآرك الله بك , يوماً سعيداً 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