Jump to content

تعديل كود , وطلب كود بسيطات أن شاء الله


Recommended Posts

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

الكود الأول :

محد يقدر يفتح النافذه إلا الأدمنيين

تفضلو عدلو على الكـود :

addCommandHandler("Panel", function() guiSetVisible(Window,true) showCursor(true) end) 

الكـود الثـاني :

أبي إذا فتحت نافذه

تمشي من اليمين أو على الشمال

وببطئ

وسللآآمتكــم , :roll:

Link to comment

Client:

function clientGUI() 
guiSetVisible(Window,true)  
showCursor(true)  
end 
addEvent("showGUI", true) 
addEventHandler("showGUI", root, showGUI) 
  

Server:

function serverGUI(thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
triggerClientEvent("showGUI", getRootElement()) 
end 
addCommandHandler("Panel", serverGUI) 

Edited by Guest
Link to comment
Client:
function clientGUI() 
guiSetVisible(Window,true)  
showCursor(true)  
end 
addEvent("showGUI", true) 
addEventHandler("showGUI, root, showGUI) 
  
 

Server:

function serverGUI(thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
triggerClientEvent("showGUI", getRootElement()) 
end 
addCommandHandler("Panel", serverGUI) 

بجرب وبرد لك خبر :roll:

Link to comment
Client:
function clientGUI() 
guiSetVisible(Window,true)  
showCursor(true)  
end 
addEvent("showGUI", true) 
addEventHandler("showGUI, root, showGUI) 
  
 

Server:

function serverGUI(thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
triggerClientEvent("showGUI", getRootElement()) 
end 
addCommandHandler("Panel", serverGUI) 

Wrong!

Link to comment
Client:
function clientGUI() 
guiSetVisible(Window,true)  
showCursor(true)  
end 
addEvent("showGUI", true) 
addEventHandler("showGUI, root, showGUI) 
  
  
 

Server:

function serverGUI(thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
triggerClientEvent("showGUI", getRootElement()) 
end 
addCommandHandler("Panel", serverGUI) 

مايشتغل =/

Link to comment

جرب ذا

-- Client Side 
  
addEvent("onShowWindow",true) 
addEventHandler("onShowWindow",root, 
    function () 
        guiSetVisible(Window,true) 
        showCursor(true) 
    end 
) 
  
-- Server Side 
  
  
addCommandHandler("Panel", 
    function (player) 
        local acc = getPlayerAccount(player) 
        if ( not isGuestAccount(acc) ) then 
            if isObjectInACLGroup("user." .. getAccountName(acc),aclGetGroup("Admin")) then 
                triggerClientEvent(player,"onShowWindow",player) 
            else 
                outputChatBox("You Are Not Admin") 
            end 
        else 
            outputChatBox("You Don't Have Account") 
        end 
    end 
) 
  

Link to comment
جرب ذا
-- Client Side 
  
addEvent("onShowWindow",true) 
addEventHandler("onShowWindow",root, 
    function () 
        guiSetVisible(Window,true) 
        showCursor(true) 
    end 
) 
  
-- Server Side 
  
  
addCommandHandler("Panel", 
    function (player) 
        local acc = getPlayerAccount(player) 
        if ( not isGuestAccount(acc) ) then 
            if isObjectInACLGroup("user." .. getAccountName(acc),aclGetGroup("Admin")) then 
                triggerClientEvent(player,"onShowWindow",player) 
            else 
                outputChatBox("You Are Not Admin") 
            end 
        else 
            outputChatBox("You Don't Have Account") 
        end 
    end 
) 
  

مآيشتغل

:|:|:|:|:|:|:|:|

Link to comment
@ Client Side 
  
addEvent("onShowWindow",true) 
addEventHandler("onShowWindow",root, 
    function () 
        guiSetVisible(Window,true) 
        showCursor(true) 
    end 
) 
  
  
@ Server Side 
  
addCommandHandler("Panel", 
function (player) 
     if (getElementType(player) == "player") then 
          if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup( "Admin")) then 
          triggerClientEvent(player,"onShowWindow",player) 
            else 
                outputChatBox("You Are Not Admin") 
            end 
        else 
            outputChatBox("You Don't Have Account") 
        end 
    end 
) 
  

نفس الشي :(:(:(:(:(

موب شغآل

Link to comment
Sorry for using English cause I don't have an Arabic keyboard, maybe someone could explain.

Show us your entire code.

الترجمة :

اسف على استخدام الانجليزي وذلك بسبب اني لآ آملك العربية في الكيبورد ربما شخص ما سيقوم بالشرح لك اطرح السكربت كامل هنا

يبيك تطرح السكربت كامل

:wink:

Link to comment
Client:
function clientGUI() 
guiSetVisible(Window,true)  
showCursor(true)  
end 
addEvent("showGUI", true) 
addEventHandler("showGUI", root, showGUI) 
  

Server:

function serverGUI(thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
triggerClientEvent("showGUI", getRootElement()) 
end 
addCommandHandler("Panel", serverGUI) 

عندك ايند ناقصة في الكود الثاني -_-

Link to comment

Client:

  
function clientGUI() 
guiSetVisible(Window,true) 
showCursor(true) 
end 
addEvent("showGUI", true) 
addEventHandler("showGUI", root, showGUI) 
  

Server:

function serverGUI(thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
triggerClientEvent("showGUI", getRootElement()) 
end 
end 
addCommandHandler("Panel", serverGUI) 

Link to comment
Client:
  
function clientGUI() 
guiSetVisible(Window,true) 
showCursor(true) 
end 
addEvent("showGUI", true) 
addEventHandler("showGUI", root, showGUI) 
  

Server:

function serverGUI(thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
triggerClientEvent("showGUI", getRootElement()) 
end 
end 
addCommandHandler("Panel", serverGUI) 

--Client 
function clientGUI() 
guiSetVisible(Window,true) 
showCursor(true) 
end 
addEvent("showGUI", true) 
addEventHandler("showGUI", root, clientGUI) 

Link to comment
Client:
  
function clientGUI() 
guiSetVisible(Window,true) 
showCursor(true) 
end 
addEvent("showGUI", true) 
addEventHandler("showGUI", root, showGUI) 
  

Server:

function serverGUI(thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
triggerClientEvent("showGUI", getRootElement()) 
end 
end 
addCommandHandler("Panel", serverGUI) 

triggerClientEvent("showGUI", getRootElement()) 

getRootElement() لو تستخدم هذا

اللوحة راح تفك عند الكل =/

Link to comment
Client:
  
function clientGUI() 
guiSetVisible(Window,true) 
showCursor(true) 
end 
addEvent("showGUI", true) 
addEventHandler("showGUI", root, showGUI) 
  

Server:

function serverGUI(thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
triggerClientEvent("showGUI", getRootElement()) 
end 
end 
addCommandHandler("Panel", serverGUI) 

triggerClientEvent("showGUI", getRootElement()) 

getRootElement() لو تستخدم هذا

اللوحة راح تفك عند الكل =/

bool triggerClientEvent ( [element sendTo=getRootElement()], string name, element theElement, [arguments...] ) 

فـ أفضل

triggerClientEvent(root, "showGUI", root) 

ثانياً ليش تتعب نفسك في كتابة وظيفة مع انك يمديك تختصرها في كلمة وحدة؟

root = getRootElement()

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