Jump to content

طلب فنشكن


Recommended Posts

مشكور ترا كتبت له اول شي بدون هذا التحقق لكنه قلي م ضبط حسبت المشكلة من التعريف

على كل حال المفروض الكود يشتغل مع وبدون تحقق الاعب هذا بس الزبدة صاحب الموضوع يقول الكود م يبي يشتغل

اظن المشكلة كيف قلت انت انه مسوي تاج للرتبة فهو يكنسل الايفنت بذاك الوقت

مشكور يعطيك العافية

Link to comment

هذا هو التاج حقي ..#

local root = getRootElement()  
  
function chatbox(text, msgtype) 
    local account = getAccountName(getPlayerAccount(source)) 
    local name = getPlayerName(source) 
 cancelEvent() 
    if isObjectInACLGroup("user." .. account, aclGetGroup("Console")) then 
        outputChatBox("#ffffff* #000000[#ff0000 Console#000000 ] " .. name .. ":#ffcc00 " .. text, root, 255, 255, 255, true) 
        
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then 
        outputChatBox("#ffffff* #000000[#D80000 Head Admin #000000] #FFFFFF#ff0000" .. name .. ":#E8A317 " .. text, root, 255, 255, 255, true)  
        
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then 
        outputChatBox("#7D1B7E°•~█|ṩὗῥἔʀмὄḋἔʀᾄҭὄʀ.Pro.|█~•°#FFFFFF#ff0000" .. name ..":#FFFFFF " .. text, root, 255, 255, 255, true) 
        
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then 
        outputChatBox("#F778A1°•~█|мὄḋἔʀᾄҭὄʀῥʀὄ|█~•°#FFFFFF#ff0000" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
     
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("VIP")) then 
        outputChatBox(" #000000[#ffffff+#ff9900Rent#000000 ]#ff9900 "  .. name .. ":#33CCFF " .. text, root, 255, 255, 255, true) 
  
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Police")) then 
        outputChatBox("#ffffff* [ #0099FFPØlice #ffffff]" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
  
  
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then 
        outputChatBox("#ffffff~|PLAYER|°#ffffff#ff0000" .. name .. ":#ffffff " .. text, root, 255, 255, 255, true) 
  
        end 
end 
addEventHandler("onPlayerChat", root, chatbox)   
  
  
Link to comment

زي كذا يعني ؟

local root = getRootElement()  
  
function chatbox(text, msgtype) 
    local account = getAccountName(getPlayerAccount(source)) 
    local name = getPlayerName(source) 
 cancelEvent() 
    if isObjectInACLGroup("user." .. account, aclGetGroup("Console")) then 
        outputChatBox("#ffffff* #000000[#ff0000 Console#000000 ] " .. name .. ":#ffcc00 " .. text, root, 255, 255, 255, true) 
        
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then 
        outputChatBox("#ffffff* #000000[#D80000 Head Admin #000000] #FFFFFF#ff0000" .. name .. ":#E8A317 " .. text, root, 255, 255, 255, true)  
        
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then 
        outputChatBox("#7D1B7E°•~█|ṩὗῥἔʀмὄḋἔʀᾄҭὄʀ.Pro.|█~•°#FFFFFF#ff0000" .. name ..":#FFFFFF " .. text, root, 255, 255, 255, true) 
        
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then 
        outputChatBox("#F778A1°•~█|мὄḋἔʀᾄҭὄʀῥʀὄ|█~•°#FFFFFF#ff0000" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
     
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("VIP")) then 
        outputChatBox(" #000000[#ffffff+#ff9900Rent#000000 ]#ff9900 "  .. name .. ":#33CCFF " .. text, root, 255, 255, 255, true) 
  
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Police")) then 
        outputChatBox("#ffffff* [ #0099FFPØlice #ffffff]" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
  
  
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then 
        outputChatBox("#ffffff~|PLAYER|°#ffffff#ff0000" .. name .. ":#ffffff " .. text, root, 255, 255, 255, true) 
         
    else 
if ( string.find(text,"شت") ) then 
  
      cancelEvent() 
      outputChatBox(" Mmno3 alsb ",text,255,0,0,true)    
      end 
  
        end 
end 
addEventHandler("onPlayerChat", root, chatbox)   
  
  

Link to comment
function chatbox(text) 
    cancelEvent() 
    if string.find(text, "شت") then 
        outputChatBox("Mmno3 alsb", source, 255, 0, 0, true)   
    return end 
    local account = getAccountName(getPlayerAccount(source)) 
    local name = getPlayerName(source) 
    if isObjectInACLGroup("user."..account, aclGetGroup("Console")) then 
        outputChatBox("#ffffff* #000000[#ff0000 Console#000000 ] "..name..":#ffcc00 "..text, root, 255, 255, 255, true) 
    elseif isObjectInACLGroup("user."..account, aclGetGroup("Admin")) then 
        outputChatBox("#ffffff* #000000[#D80000 Head Admin #000000] #FFFFFF#ff0000"..name..":#E8A317 "..text, root, 255, 255, 255, true) 
    elseif isObjectInACLGroup("user."..account, aclGetGroup("SuperModerator")) then 
        outputChatBox("#7D1B7E°•~█|ṩὗῥἔʀмὄḋἔʀᾄҭὄʀ.Pro.|█~•°#FFFFFF#ff0000"..name..":#FFFFFF "..text, root, 255, 255, 255, true) 
    elseif isObjectInACLGroup("user."..account, aclGetGroup("Moderator")) then 
        outputChatBox("#F778A1°•~█|мὄḋἔʀᾄҭὄʀῥʀὄ|█~•°#FFFFFF#ff0000"..name..":#FFFFFF "..text, root, 255, 255, 255, true) 
    elseif isObjectInACLGroup("user."..account, aclGetGroup("VIP")) then 
        outputChatBox(" #000000[#ffffff+#ff9900Rent#000000 ]#ff9900 "..name..":#33CCFF "..text, root, 255, 255, 255, true) 
    elseif isObjectInACLGroup("user."..account, aclGetGroup("Police")) then 
        outputChatBox("#ffffff* [ #0099FFPØlice #ffffff]"..name..":#FFFFFF "..text, root, 255, 255, 255, true) 
    elseif isObjectInACLGroup("user."..account, aclGetGroup("Everyone")) then 
        outputChatBox("#ffffff~|PLAYER|°#ffffff#ff0000"..name..":#ffffff "..text, root, 255, 255, 255, true) 
    end 
end 
addEventHandler("onPlayerChat", root, chatbox) 

Link to comment
function chatbox(text) 
    cancelEvent() 
    if string.find(text, "شت") then 
        outputChatBox("Mmno3 alsb", source, 255, 0, 0, true)   
    return end 
    local account = getAccountName(getPlayerAccount(source)) 
    local name = getPlayerName(source) 
    if isObjectInACLGroup("user."..account, aclGetGroup("Console")) then 
        outputChatBox("#ffffff* #000000[#ff0000 Console#000000 ] "..name..":#ffcc00 "..text, root, 255, 255, 255, true) 
    elseif isObjectInACLGroup("user."..account, aclGetGroup("Admin")) then 
        outputChatBox("#ffffff* #000000[#D80000 Head Admin #000000] #FFFFFF#ff0000"..name..":#E8A317 "..text, root, 255, 255, 255, true) 
    elseif isObjectInACLGroup("user."..account, aclGetGroup("SuperModerator")) then 
        outputChatBox("#7D1B7E°•~█|ṩὗῥἔʀмὄḋἔʀᾄҭὄʀ.Pro.|█~•°#FFFFFF#ff0000"..name..":#FFFFFF "..text, root, 255, 255, 255, true) 
    elseif isObjectInACLGroup("user."..account, aclGetGroup("Moderator")) then 
        outputChatBox("#F778A1°•~█|мὄḋἔʀᾄҭὄʀῥʀὄ|█~•°#FFFFFF#ff0000"..name..":#FFFFFF "..text, root, 255, 255, 255, true) 
    elseif isObjectInACLGroup("user."..account, aclGetGroup("VIP")) then 
        outputChatBox(" #000000[#ffffff+#ff9900Rent#000000 ]#ff9900 "..name..":#33CCFF "..text, root, 255, 255, 255, true) 
    elseif isObjectInACLGroup("user."..account, aclGetGroup("Police")) then 
        outputChatBox("#ffffff* [ #0099FFPØlice #ffffff]"..name..":#FFFFFF "..text, root, 255, 255, 255, true) 
    elseif isObjectInACLGroup("user."..account, aclGetGroup("Everyone")) then 
        outputChatBox("#ffffff~|PLAYER|°#ffffff#ff0000"..name..":#ffffff "..text, root, 255, 255, 255, true) 
    end 
end 
addEventHandler("onPlayerChat", root, chatbox) 

اشتغل المود #

تمت الافادة #

بآرك الله فيك تابل على المجهود

# مشكور محمد على المجهود

بارك الله فيكم جميعا

ويجعله من ميزان حسناتكم يارب ..

ممكن سؤال اخير ؟ ض3

    return end 

هذي الوظيفه وش فايدتها ممكن شرح بسيط ؟ :)

Link to comment

return لو حطيت

خلاص السكربت مابيواصل قراءة الفنكشن

-- من هنا وتحت مابيفيدك الا لو تبي تصنع فنكشن --

مثلاً return ولو حطيت قيمة بعد ال

function test()

return true

end

واستخدمت الفنكشن

nvm = test()

print(tostring(nvm))

true القيمة الي بيرجعها الفنكشن هي

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