Jump to content

ابي كود صغير وبسيط


Recommended Posts

السلام عليكم شباب ابي كود لما تكتب امر في الشات يلسك لبس معين ويكون لرتبه معينه

يعني مثلا لو الشرطي كتبت في الشات تنظيم يلبسه لبس معين

وشكرا

Link to comment

تحتاج اكواد سيرفر فقط

  
'onPlayerChat' : Event حدث الكتابة بالشات 
function ( message , type ) : وظيفة 
if message:find("تنظيم") then : تحقق اذا وجدت كلمة تنظيم بالرسالة 
isObjectInACLGroup : تحقق اذا كان حساب اللاعب بقروب 
getPlayerAccount : حساب اللاعب 
getAccountName : اسم الحساب 
aclGetGroup : القروب 
setElementModel : skin منح اللاعب 
  
Link to comment

addEventHandler ( "onPlayerChat", root, function ( Message, type ) 
if not ( isGuestAccount ( getPlayerAccount ( source ) ) ) then 
    if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Police" ) ) ) then 
        if ( type == 0 ) then 
            if ( Message:find ( "تنظيم" ) ) then 
                setElementModel ( source, رقم السكن ) 
                    outputChatBox ( "لقد حصلت على سكن", source, 0, 255, 0, true ) 
                end 
            end 
        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...