Jump to content

طلب بسيط


Recommended Posts

Posted

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

انا جديد في عالم البرمجة

ممكن طلب بسيط

    function login() 
        if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then 
        outputChatBox("#808080 بتسجيل دخوله .." .. getPlayerName(source) .. "#ff0000 لقد قام صاحب السيرفر : #ffffff", getRootElement(), 255,0,0, true) 
      end -- The End of " if " 
      
    end -- The End of " function login " 
    addEventHandler("onPlayerLogin", getRootElement(), login) 

الطلب هو : ابي أخلي المراقب والمشرف والادارة لما يسجلون الدخول تطلع هاذي الرسالة

        if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then 
        outputChatBox("#808080 بتسجيل دخوله .." .. getPlayerName(source) .. "#ff0000 لقد قام ..... : #ffffff",  

أظن انه بسيط وسهل جدا على المبرمجين :):)

Posted

if isObjectInACLGroup ( "user." .. getAccountName (getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) then 
or 
if isObjectInACLGroup ( "user." .. getAccountName (getPlayerAccount(source)), aclGetGroup ( "SuperModerator" ) ) then 
or 
if isObjectInACLGroup ( "user." .. getAccountName (getPlayerAccount(source)), aclGetGroup ( "Moderator" ) ) then 
or 
if isObjectInACLGroup ( "user." .. getAccountName (getPlayerAccount(source)), aclGetGroup ( "Console" ) ) then 
Posted

عملته كذا لاكن لم يضبط

    function login() 
    if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then 
    outputChatBox("#808080 بتسجيل دخوله .." .. getPlayerName(source) .. "#ff0000 لقد قام صاحب السيرفر : #ffffff", getRootElement(), 255,0,0, true) 
    or 
    if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then 
    outputChatBox("#808080 بتسجيل دخوله .." .. getPlayerName(source) .. "#ff0000 لقد قام صاحب السيرفر : #ffffff", getRootElement(), 255,0,0, true) 
      end -- The End of " if " 
    end -- The End of " function login " 
    addEventHandler("onPlayerLogin", getRootElement(), login) 

Posted
    function login() 
    if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then 
    outputChatBox("#808080 بتسجيل دخوله .." .. getPlayerName(source) .. "#ff0000 لقد قام صاحب السيرفر : #ffffff", getRootElement(), 255,0,0, true) 
    elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then 
    outputChatBox("#808080 بتسجيل دخوله .." .. getPlayerName(source) .. "#ff0000 لقد قام صاحب السيرفر : #ffffff", getRootElement(), 255,0,0, true) 
      end -- The End of " if " 
    end -- The End of " function login " 
    addEventHandler("onPlayerLogin", getRootElement(), login) 

:?جرب

Posted
local Group = {  
"Console", 
"Admin", 
"SuperModerator", 
"Moderator", 
} 
   function login() 
for _, v in ipairs ( Group ) do 
        if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup(v)) then 
        outputChatBox("#808080 بتسجيل دخوله .." .. getPlayerName(source) .. "#ff0000 لقد قام "..v.." : #ffffff", getRootElement(), 255,0,0, true) 
      end -- The End of " if " 
    end -- The End of " function login " 
    end -- The End of " Loop " 
    addEventHandler("onPlayerLogin", getRootElement(), login) 

560x95_FFFFFF_FF9900_000000_000000.png

Posted
    function login() 
    if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then 
    outputChatBox("#808080 بتسجيل دخوله .." .. getPlayerName(source) .. "#ff0000 لقد قام صاحب السيرفر : #ffffff", getRootElement(), 255,0,0, true) 
    elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then 
    outputChatBox("#808080 بتسجيل دخوله .." .. getPlayerName(source) .. "#ff0000 لقد قام صاحب السيرفر : #ffffff", getRootElement(), 255,0,0, true) 
      end -- The End of " if " 
    end -- The End of " function login " 
    addEventHandler("onPlayerLogin", getRootElement(), login) 

:?جرب

مشكوووووووور أخوي AHMAD1234 وما قصرت

تمت الافادة

الرجاء الاغلاق :!::!::roll::roll:

Posted
function login() 
        if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Big.Admin")) then 
        outputChatBox("#808080 بتسجيل الدخول #006edf.." .. getPlayerName(source) .. "#808080 لقد قام الأدمن : #ffffff", getRootElement(), 255,0,0, true) 
        elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then 
        outputChatBox("#808080 بتسجيل الدخول #006edf.." .. getPlayerName(source) .. "#808080 لقد قام الأدمن : #ffffff", getRootElement(), 255,0,0, true) 
        elseif isObjectInACLGroup("user." #006edf.. getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then 
        outputChatBox("#808080 بتسجيل الدخول #006edf.." .. getPlayerName(source) .. "#808080 لقد قام الأدمن : #ffffff", getRootElement(), 255,0,0, true) 
        elseif isObjectInACLGroup("user." #006edf.. getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then 
        outputChatBox("#808080 بتسجيل الدخول #006edf.." .. getPlayerName(source) .. "#808080 لقد قام الأدمن : #ffffff", getRootElement(), 255,0,0, true) 
        elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then 
        outputChatBox("#808080 بتسجيل الدخول #006edf.." .. getPlayerName(source) .. "#808080 لقد قام الأدمن : #ffffff", getRootElement(), 255,0,0, true) 
        elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then 
        outputChatBox("#808080 بتسجيل الدخول #006edf.." .. getPlayerName(source) .. "#808080 لقد قام الأدمن#ffffff", getRootElement(), 255,0,0, true) 
          end -- The End of " if " 
        end -- The End of " function login " 
        addEventHandler("onPlayerLogin", getRootElement(), login) 
  

هل يوجد خطأ ؟؟

Posted
local Group = {  
"Console", 
"Admin", 
"SuperModerator", 
"Moderator", 
} 
   function login() 
for _, v in ipairs ( Group ) do 
        if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup(v)) then 
        outputChatBox("#808080 بتسجيل دخوله .." .. getPlayerName(source) .. "#ff0000 لقد قام "..v.." : #ffffff", getRootElement(), 255,0,0, true) 
      end -- The End of " if " 
    end -- The End of " function login " 
    end -- The End of " Loop " 
    addEventHandler("onPlayerLogin", getRootElement(), login) 

اخوي ,

جرب ذا الكود ,

اسهل اكثر ^^

بس عليك تضيف اسم القروب في الجدول

560x95_FFFFFF_FF9900_000000_000000.png

Posted
function login() 
        if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Big.Admin")) then 
        outputChatBox("#808080 بتسجيل الدخول #006edf.." .. getPlayerName(source) .. "#808080 لقد قام الأدمن : #ffffff", getRootElement(), 255,0,0, true) 
        elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then 
        outputChatBox("#808080 بتسجيل الدخول #006edf.." .. getPlayerName(source) .. "#808080 لقد قام الأدمن : #ffffff", getRootElement(), 255,0,0, true) 
        elseif isObjectInACLGroup("user." #006edf.. getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then 
        outputChatBox("#808080 بتسجيل الدخول #006edf.." .. getPlayerName(source) .. "#808080 لقد قام الأدمن : #ffffff", getRootElement(), 255,0,0, true) 
        elseif isObjectInACLGroup("user." #006edf.. getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then 
        outputChatBox("#808080 بتسجيل الدخول #006edf.." .. getPlayerName(source) .. "#808080 لقد قام الأدمن : #ffffff", getRootElement(), 255,0,0, true) 
        elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then 
        outputChatBox("#808080 بتسجيل الدخول #006edf.." .. getPlayerName(source) .. "#808080 لقد قام الأدمن : #ffffff", getRootElement(), 255,0,0, true) 
        elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then 
        outputChatBox("#808080 بتسجيل الدخول #006edf.." .. getPlayerName(source) .. "#808080 لقد قام الأدمن#ffffff", getRootElement(), 255,0,0, true) 
          end -- The End of " if " 
        end -- The End of " function login " 
        addEventHandler("onPlayerLogin", getRootElement(), login) 
  

هل يوجد خطأ ؟؟

function login() 
if isObjectInACLGroup ( "user." .. getAccountName (getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) then 
-- الرسالة هنا 
elseif isObjectInACLGroup ( "user." .. getAccountName (getPlayerAccount(source)), aclGetGroup ( "SuperModerator" ) ) then 
-- الرسالة هنا 
elseif isObjectInACLGroup ( "user." .. getAccountName (getPlayerAccount(source)), aclGetGroup ( "Moderator" ) ) then 
-- الرسالة هنا 
elseif isObjectInACLGroup ( "user." .. getAccountName (getPlayerAccount(source)), aclGetGroup ( "Console" ) ) then 
-- الرسالة هنا 
end 
end 
  addEventHandler("onPlayerLogin", getRootElement(), login) 

+ كودك صحيح

Posted (edited)
؟؟ v احط اسم القروب بدل حرف

كود احمد مشوار ,

جرب كود جعفر ,

local Group = {  
"Console", 
"Admin", 
"SuperModerator", 
"Moderator", 
} 
   function login() 
for _, v in ipairs ( Group ) do 
        if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup(v)) then 
        outputChatBox("#808080 بتسجيل دخوله .." .. getPlayerName(source) .. "#ff0000 لقد قام "..v.." : #ffffff", getRootElement(), 255,0,0, true) 
      end -- The End of " if " 
    end -- The End of " function login " 
    end -- The End of " Loop " 
    addEventHandler("onPlayerLogin", getRootElement(), login) 

لو تبي تضيف قروب سوي كذا ,

local Group = {  
"Console", 
"Admin", 
"SuperModerator", 
"Moderator", 
"V.I.P", 
} 

ضفت قروب V.I.P

يمديك تضيف اي قروب ,

Edited by Guest

Sha67 سابقاً

Posted

بدال ماتتأكد اذا كان في قروب اسل

تأكد انه عنده لوحة ادمنية

وبكذا راح تكون للمشرفين والمراقبين والأدارة والكونسل

hasObjectPermissionTo 

Posted

AHMAD1234 مشكورييييييييييين ركبت كود احمد وضبط :o:o

    function login() 
    if isObjectInACLGroup ( "user." .. getAccountName (getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) then 
        outputChatBox("#808080 بتسجيل الدخول #006edfx[" .. getPlayerName(source) .. "]x#808080 لقد قام الأدمن#ffffff", getRootElement(), 255,0,0, true) 
    elseif isObjectInACLGroup ( "user." .. getAccountName (getPlayerAccount(source)), aclGetGroup ( "SuperModerator" ) ) then 
        outputChatBox("#808080 بتسجيل الدخول #006edfx[" .. getPlayerName(source) .. "]x#808080 لقد قام الأدمن#ffffff", getRootElement(), 255,0,0, true) 
    elseif isObjectInACLGroup ( "user." .. getAccountName (getPlayerAccount(source)), aclGetGroup ( "Moderator" ) ) then 
        outputChatBox("#808080 بتسجيل الدخول #006edfx[" .. getPlayerName(source) .. "]x#808080 لقد قام الأدمن#ffffff", getRootElement(), 255,0,0, true) 
    elseif isObjectInACLGroup ( "user." .. getAccountName (getPlayerAccount(source)), aclGetGroup ( "Console" ) ) then 
        outputChatBox("#808080 بتسجيل الدخول #006edfx[" .. getPlayerName(source) .. "]x#808080 لقد قام الأدمن#ffffff", getRootElement(), 255,0,0, true) 
    elseif isObjectInACLGroup ( "user." .. getAccountName (getPlayerAccount(source)), aclGetGroup ( "Big.Admin" ) ) then 
        outputChatBox("#808080 بتسجيل الدخول #006edfx[" .. getPlayerName(source) .. "]x#808080 لقد قام الأدمن#ffffff", getRootElement(), 255,0,0, true) 
    end 
    end 
      addEventHandler("onPlayerLogin", getRootElement(), login) 

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