Jump to content

سوال


momar5700

Recommended Posts

Posted

كيف اخلي زر ماتقدر تدوس عليه الا لما تكون معك رتبه انا محددها

او كيف اخليه تقتح لمجموعة رتب انا محددة مو رتبه وحدا

Posted

اذا تبي زر كيبورد

-- # Client Side 
bindKey 
triggerServerEvent 
  
-- # Server Side 
table 
  
addEvent 
addEventHandler 
isObjectInACLGroup 
getElementsByType -- Loop [ tabel ] 
triggerClientEvent 
  
-- # Client Side 
addEvent 
addEventHandler 
guiSetVisible 
showCursor 

زر GUI

-- # Client Side 
  
-- # Events : 'onClientGUIClick' 
  
triggerServerEvent 
  
-- # Server Side 
table 
  
addEvent 
addEventHandler 
isObjectInACLGroup 
getElementsByType -- Loop [ tabel ] 
triggerClientEvent 
  
-- # Client Side 
addEvent 
addEventHandler 
guiSetVisible 
showCursor 
Posted (edited)
getAccountName 
getPlayerAccount 
isObjectInACLGroup 
aclGetGroup 

لو تبي كامل :-

--Client Side

mezoo = guiCreateWindow(50, 50, 50, 50, "Example", false) 
mezo = guiCreateButton(9, 73, 99, 62, "Example", false, mezo) 
  
function example() 
if source == mezo then  
triggerServerEvent ( "example", localPlayer ) 
end 
end 
addEventHandler ( "onClientGUIClick", getRootElement (), example) 
  

--Server Side

  
function name ( ) 
   local account = getAccountName ( getPlayerAccount ( source ) ) 
   if isObjectInACLGroup ("user."..account, aclGetGroup ( "Admin" ) ) then  
setPedArmor (source,100) 
outputChatBox("الكلام الي تبيه لو معه ادمن",source,255,255,0,false) 
else 
outputChatBox("الكلام الي تبيه لو هو مو معه ادمن",source,255,0,0,false) 
   end 
end 
addEvent( "example", true ) 
addEventHandler( "example", getRootElement(),name ) 
  

:)

Edited by Guest
Posted

شوف اقترح لك تسوي

اذ سجل دخولة يعطيه داتا

واذ سجل خروجة يسحب الداتا

بعدين بالكلنت

استخدم حدث

onClientElementDataChange

عشان اول ماتتغير قيمة الداتا تفتح الزر او تغلقه :mrgreen:

فكرة رائعة ما شاء الله ابدعت :D

Posted

انا مسوي في زر لما تضغط عليه كانك كتبت كلمة في اف8

المشكله اني ابي احط زر محد يقد ر يفتحة الا غيرررر بس كدا

Posted

شوف اقترح لك تسوي

اذ سجل دخولة يعطيه داتا

واذ سجل خروجة يسحب الداتا

بعدين بالكلنت

استخدم حدث

onClientElementDataChange

عشان اول ماتتغير قيمة الداتا تفتح الزر او تغلقه :mrgreen:

مش فاهم انا سويتها كدا صح ولا خطا

كلنت

addEvent("openOk",true)
addEventHandler("openOk",root,
    function ()
        guiSetVisible(Window1,true)
        showCursor(true)
        guiSetEnabled(BTN1_open,true)
    end
)
 
addEvent("openNo",true)
addEventHandler("openNo",root,
    function ()
        guiSetVisible(Window1,true)
        showCursor(true)
        guiSetEnabled(BTN1_open,false)
    end
)

سيرفر

addEventHandler("onPlayerJoin",root,
function ()
    bindKey(source,"f5","down",OPEN) ----- Change "i" to the key you want
end)
 
addEventHandler("onResourceStart",resourceRoot,
function ()
    for index, player in ipairs(getElementsByType("player")) do
        bindKey(player,"f5","down",OPEN) ----Change "i" to the key you want
    end
end)
 
function OPEN ( player )
    local player = player or source
    local accountname = getAccountName( getPlayerAccount( player ) )
    if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ))  then
       triggerClientEvent ( player,"openOk", player )
    else
       triggerClientEvent ( player,"openNo", player )
    end
end
addEvent( "OPEN", true )
addEventHandler ( "OPEN", getRootElement(), OPEN)
addCommandHandler ( "gpp", OPEN )

Posted

اخر سوال

كيف اسوي لوحة تفتحة لحساب معين

او لمجموعة حسابات

يعني ابيه مثلا تفتح لحسابي اني بس

Posted
if getAccount("example") then 
    if getAccountName(getPlayerAccount(player)) == "example" then 
        -- You are code 
    end 
end 

getAccount?

Posted

addEvent("openOk",true)

addEventHandler("openOk",root,

    function ()

        guiSetVisible(Window1,true)

        showCursor(true)

        guiSetEnabled(BTN1_open,true)

    end

)

 

addEvent("openNo",true)

addEventHandler("openNo",root,

    function ()

        guiSetVisible(Window1,true)

        showCursor(true)

        guiSetEnabled(BTN1_open,false)

    end

)

سيرفر

addEventHandler("onPlayerJoin",root,

function ()

    bindKey(source,"f5","down",OPEN) ----- Change "i" to the key you want

end)

 

addEventHandler("onResourceStart",resourceRoot,

function ()

    for index, player in ipairs(getElementsByType("player")) do

        bindKey(player,"f5","down",OPEN) ----Change "i" to the key you want

    end

end)

 

function OPEN ( player )

    local player = player or source

    local accountname = getAccountName( getPlayerAccount( player ) )

    if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ))  then

       triggerClientEvent ( player,"openOk", player )

    else

       triggerClientEvent ( player,"openNo", player )

    end

end

addEvent( "OPEN", true )

addEventHandler ( "OPEN", getRootElement(), OPEN)

addCommandHandler ( "gpp", OPEN )

وش الي انت كاتبه ذا ؟ ^

Posted
if getAccount("example") then 
    if getAccountName(getPlayerAccount(player)) == "example" then 
        -- You are code 
    end 
end 

getAccount?

يب يتحقق من وجود الحساب قبل التحقق من حساب اللاعب

Posted
local accountsWhitelist = { 
["ALw7sH"] = true, 
} 
  
function openWindow(player) 
    local account = getPlayerAccount(player) 
    if not isGuestAccount(account) then 
        if accountsWhitelist[getPlayerAccount(account)] then 
            triggerClientEvent(player,"onPlayerWantToShowWindow",player) 
        end 
    end 
end 
addCommandHandler("window",openWindow) 

ممكن توريني وين احتاج

getAccount ?

معى العلم ذا طلب صاحب الموضوع

اخر سوال

كيف اسوي لوحة تفتحة لحساب معين

او لمجموعة حسابات

يعني ابيه مثلا تفتح لحسابي اني بس

Posted
local accountsWhitelist = { 
    ["Allawi"] = true, 
    ["ALw7sH"] = true, 
} 
  
function openWindow(player) 
    if not isGuestAccount(getPlayerAccount(player)) then 
        for accounts in pairs(accountsWhitelist) do  
            if getAccount(accounts) then 
                if getAccountName(getPlayerAccount(player)) == accounts then 
                    triggerClientEvent(player,"onPlayerWantToShowWindow",player) 
                    break 
                end 
            end 
        end 
    end 
end 
addCommandHandler("window",openWindow) 

Posted
addEvent("openOk",true)

addEventHandler("openOk",root,

    function ()

        guiSetVisible(Window1,true)

        showCursor(true)

        guiSetEnabled(BTN1_open,true)

    end

)

 

addEvent("openNo",true)

addEventHandler("openNo",root,

    function ()

        guiSetVisible(Window1,true)

        showCursor(true)

        guiSetEnabled(BTN1_open,false)

    end

)

سيرفر

addEventHandler("onPlayerJoin",root,

function ()

    bindKey(source,"f5","down",OPEN) ----- Change "i" to the key you want

end)

 

addEventHandler("onResourceStart",resourceRoot,

function ()

    for index, player in ipairs(getElementsByType("player")) do

        bindKey(player,"f5","down",OPEN) ----Change "i" to the key you want

    end

end)

 

function OPEN ( player )

    local player = player or source

    local accountname = getAccountName( getPlayerAccount( player ) )

    if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ))  then

       triggerClientEvent ( player,"openOk", player )

    else

       triggerClientEvent ( player,"openNo", player )

    end

end

addEvent( "OPEN", true )

addEventHandler ( "OPEN", getRootElement(), OPEN)

addCommandHandler ( "gpp", OPEN )

وش الي انت كاتبه ذا ؟ ^

انا خليته يخفي زرر

يعني يفتح بكلمه من اف8 ومن زر اف5

و لما تفتحه ماتقدر تسوي اي شيء تلاقي زر مخفي علشان تضغط عليه لازم تكون معك رتبت

Posted
local accountsWhitelist = { 
    ["Allawi"] = true, 
    ["ALw7sH"] = true, 
} 
  
function openWindow(player) 
    if not isGuestAccount(getPlayerAccount(player)) then 
        for accounts in pairs(accountsWhitelist) do  
            if getAccount(accounts) then 
                if getAccountName(getPlayerAccount(player)) == accounts then 
                    triggerClientEvent(player,"onPlayerWantToShowWindow",player) 
                    break 
                end 
            end 
        end 
    end 
end 
addCommandHandler("window",openWindow) 

شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا

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