Jump to content

# Edit Code Clear Chat


Adham

Recommended Posts

Posted

سسلأم عليكم عملت كود مسح شات ما ظبت

ابيكم تعدلولي عليه

الكود

Server :

function clear ( thePlayer ) 
local cuenta = getAccountName( getPlayerAccount(thePlayer) ) 
if isObjectInACLGroup("user."..cuenta, aclGetGroup("Console")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 1")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 2")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 3")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 4")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 5")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 6")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Head.Admin")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Trainee")) then 
spaces(thePlayer) 
end 
end 
addCommandHandler("77", clear) 
  
  
outputChatBox(" ") 
outputChatBox(" ") 
outputChatBox(" ") 
outputChatBox(" ") 
outputChatBox(" ") 
outputChatBox(" ") 
outputChatBox(" #0099cc"..getPlayerName(thePlayer).." - Cleard Chat, getRootElement(), 255, 255, 255, true)end[/b] 
 

Posted
سسلأم عليكم عملت كود مسح شات ما ظبت

ابيكم تعدلولي عليه

الكود

Server :

function clear ( thePlayer ) 
local cuenta = getAccountName( getPlayerAccount(thePlayer) ) 
if isObjectInACLGroup("user."..cuenta, aclGetGroup("Console")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 1")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 2")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 3")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 4")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 5")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 6")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Head.Admin")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Trainee")) then 
spaces(thePlayer) 
end 
end 
addCommandHandler("77", clear) 
  
  
outputChatBox(" ") 
outputChatBox(" ") 
outputChatBox(" ") 
outputChatBox(" ") 
outputChatBox(" ") 
outputChatBox(" ") 
outputChatBox(" #0099cc"..getPlayerName(thePlayer).." - Cleard Chat, getRootElement(), 255, 255, 255, true)end[/b] 
  
 

  
function clear ( thePlayer ) 
local cuenta = getAccountName( getPlayerAccount(thePlayer) ) 
if isObjectInACLGroup("user."..cuenta, aclGetGroup("Console")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 1")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 2")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 3")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 4")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 5")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Level 6")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Head.Admin")) then 
    spaces(thePlayer) 
elseif isObjectInACLGroup("user."..cuenta, aclGetGroup("Trainee")) then 
    spaces(thePlayer) 
end 
end 
addCommandHandler("77", clear) 
  
function spaces () 
outputChatBox(" ") 
outputChatBox(" ") 
outputChatBox(" ") 
outputChatBox(" ") 
outputChatBox(" ") 
outputChatBox(" ") 
outputChatBox(" #0099cc"..getPlayerName(thePlayer).." - Cleard Chat", getRootElement(), 255, 255, 255, true) 
end 
  

جرب :roll:

Posted
local Admins = { "Console", "Admin" } 
  
  
  
function clear ( thePlayer ) 
local cuenta = getAccountName( getPlayerAccount(thePlayer) ) 
   
  for k,v in ipairs ( Admins ) do 
  
if isObjectInACLGroup("user."..cuenta, aclGetGroup(v)) then 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" #0099cc"..getPlayerName(thePlayer).." - Cleard Chat", getRootElement(), 255, 255, 255, true) 
  
end 
  
end 
  
end 
addCommandHandler("77", clear) 
  
  

Posted
ما ظبت + بيمسح الشات نصو

و مش بيكتب Clear chat

local Admins = { "Console", "Admin" } 
  
  
  
function clear ( thePlayer ) 
  
local cuenta = getAccountName( getPlayerAccount(thePlayer) ) 
   
  for k,v in ipairs ( Admins ) do 
  
if isObjectInACLGroup("user."..cuenta, aclGetGroup(v)) then 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
  
outputChatBox(" #0099cc"..getPlayerName(thePlayer).." - Cleard Chat",root, 0, 255, 0, true) 
  
end 
  
end 
  
end 
addCommandHandler("77", clear) 

Posted

جرب كذا ي لعبة

  
local Admins = { "Console", "Admin" } 
  
  
  
function clear ( thePlayer ) 
  
local cuenta = getAccountName( getPlayerAccount(thePlayer) ) 
  
  for k,v in ipairs ( Admins ) do 
  
if isObjectInACLGroup("user."..cuenta, aclGetGroup(v)) then 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" ") 
  
outputChatBox(" #0099cc"..getPlayerName(thePlayer).." - Cleard Chat",root, 0, 255, 0, true) 
  
end 
  
end 
  
end 
addCommandHandler("77", clear) 
  

Posted
GR = {"Console","Admin"} 
  
addCommandHandler("777", 
    function (player) 
        local acc = getPlayerAccount(player) 
        if not isGuestAccount(acc) then 
            for i,group in ipairs(GR) do 
                if isObjectInACLGroup("user." .. getAccountName(acc),aclGetGroup(group)) then 
                    for i=40 do 
                        outputChatBox("    ") 
                    end 
                    return 
                end 
            end 
        end 
    end 
) 
  

Posted (edited)

local Admins = { "Console", "Admin" } 
  
function clear ( thePlayer ) 
  
local cuenta = getAccountName( getPlayerAccount ( thePlayer ) ) 
  
if not isGuestAccount(cuenta) then 
  
for _ , v in ipairs ( Admins ) do 
  
if isObjectInACLGroup("user."..cuenta, aclGetGroup( v )) then 
  
for i = 0 , 17 do  
  
outputChatBox ( " " , root ) 
  
    end 
     
outputChatBox(" #0099cc"..getPlayerName( thePlayer ).." - Cleard Chat",root, 0, 255, 0, true) 
            end 
        end 
    end 
end 
addCommandHandler("77", clear ) 

Edited by Guest
Posted
GR = {"Console","Admin"} 
  
addCommandHandler("777", 
    function (player) 
        local acc = getPlayerAccount(player) 
        if not isGuestAccount(acc) then 
            for i,group in ipairs(GR) do 
                if isObjectInACLGroup("user." .. getAccountName(acc),aclGetGroup(group)) then 
                    for i=40 do 
                        outputChatBox("    ") 
                    end 
                    return 
                end 
            end 
        end 
    end 
) 
  

ليش حطيت

for i = 40 do

؟

Posted
GR = {"Console","Admin"} 
  
addCommandHandler("777", 
    function (player) 
        local acc = getPlayerAccount(player) 
        if not isGuestAccount(acc) then 
            for i,group in ipairs(GR) do 
                if isObjectInACLGroup("user." .. getAccountName(acc),aclGetGroup(group)) then 
                    for i=40 do 
                        outputChatBox("    ") 
                    end 
                    return 
                end 
            end 
        end 
    end 
) 
  

ليش حطيت

for i = 40 do

؟

عشان يكرر في الشات 40 مره

Posted
GR = {"Console","Admin"} 
  
addCommandHandler("777", 
    function (player) 
        local acc = getPlayerAccount(player) 
        if not isGuestAccount(acc) then 
            for i,group in ipairs(GR) do 
                if isObjectInACLGroup("user." .. getAccountName(acc),aclGetGroup(group)) then 
                    for i=40 do 
                        outputChatBox("    ") 
                    end 
                    return 
                end 
            end 
        end 
    end 
) 
  

ليش حطيت

for i = 40 do

؟

هذا اللوب الرقمي

يستعمل في تكرار العمليات حسب رقم من اختيارك

وتقدر تحدد من متي يبدا ومتي ينتهي

مثلاً يكرر من

0 ل 10

كذا 10 مرات

وممكن من

25 ل 70

طيب كيف تجيب كام بيكرر؟

لو كان ما يبدأ ب صفر و اعداد كبيرة؟

اطرح العددين من بعض يطلع لك الفرق

كيف يتركب؟

for NumberVar = start, end, increment do 
    --- 
end 

NumberVar = متغير حق رقم العملية

start = الرقم اللي اللوب بيبدأ منه

end = الرقم اللي بينتهي عنده

increment : زيادة اللوب

طبعاً ثالث شيء حق الزيادة اختياري

بس مفيد ويلحس شوي

الارقمنت هذا يزود كام مرة كل مرة يمر بلعملية

يعني مثلاً حطيت 5

كل مرة يسوي لوب

متغير NumberVar

بيزيد 5

Note : الارقمنت اختياري ومو شرط تحطه

------------

بلنسبة لاخوي طلال

ترتيبك للوب خاطيء و بيجب خطأ

المفروض كذا

for i = 0, 40 do 

:~)

  • 1 month later...
Posted
GR = {"Console","Admin"} 
  
addCommandHandler("777", 
    function (player) 
        local acc = getPlayerAccount(player) 
        if not isGuestAccount(acc) then 
            for i,group in ipairs(GR) do 
                if isObjectInACLGroup("user." .. getAccountName(acc),aclGetGroup(group)) then 
                    for i=40 do 
                        outputChatBox("    ") 
                    end 
                    return 
                end 
            end 
        end 
    end 
) 
  

ليش حطيت

for i = 40 do

؟

هذا اللوب الرقمي

يستعمل في تكرار العمليات حسب رقم من اختيارك

وتقدر تحدد من متي يبدا ومتي ينتهي

مثلاً يكرر من

0 ل 10

كذا 10 مرات

وممكن من

25 ل 70

طيب كيف تجيب كام بيكرر؟

لو كان ما يبدأ ب صفر و اعداد كبيرة؟

اطرح العددين من بعض يطلع لك الفرق

كيف يتركب؟

for NumberVar = start, end, increment do 
    --- 
end 

NumberVar = متغير حق رقم العملية

start = الرقم اللي اللوب بيبدأ منه

end = الرقم اللي بينتهي عنده

increment : زيادة اللوب

طبعاً ثالث شيء حق الزيادة اختياري

بس مفيد ويلحس شوي

الارقمنت هذا يزود كام مرة كل مرة يمر بلعملية

يعني مثلاً حطيت 5

كل مرة يسوي لوب

متغير NumberVar

بيزيد 5

Note : الارقمنت اختياري ومو شرط تحطه

------------

بلنسبة لاخوي طلال

ترتيبك للوب خاطيء و بيجب خطأ

المفروض كذا

for i = 0, 40 do 

:~)

للاسف انت تكلم واحد له سنتين ما برمج

فاعذرني اذا اخطيت

لكن مصيري ارجع كل المعلومات

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