Jump to content

طلب فنكشن


Recommended Posts

السلام عليكم ورحمة الله وبركاتهـ ..

بغيت اسوي تيمين..

الاول تيم للهجولة

والثاني للحرب

ابي الفنكشن الي يمنع الكلام في ال teamsay

عشان ما يسبون هناك وكذا ..

اتمنى انكم فهمتوني والسلام عليكم :arrowdown:

Link to comment
local function playerChat(message, messageType) 
    if messageType == 2 then  
                cancelEvent() 
    end 
end 
addEventHandler("onPlayerChat", root, playerChat) 

؟abo_7mod ايش الفرق بين كودك و كود

Link to comment

تمام اشتغل

طيب مثلاً كيف اخلي فقط تيم واحد يقدر يتكلم بالتي ساي

سويت الكود هذا وما اشتغل

addEventHandler("onPlayerChat",root, 
function (msg,type) 
if (type == 2) then 
if (getPlayerTeam(source) ~= "admin") then 
cancelEvent () 
end 
  end 
    end) 

Link to comment
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

ما ظنيت اني اقدر اسويها لكن جربت بنفسي ,

اظن انها خطأ ممكن تساعدني

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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...