momar5700 Posted November 24, 2015 Share Posted November 24, 2015 كيف اخلي زر ماتقدر تدوس عليه الا لما تكون معك رتبه انا محددها او كيف اخليه تقتح لمجموعة رتب انا محددة مو رتبه وحدا Link to comment
Rockyz Posted November 24, 2015 Share Posted November 24, 2015 اذا تبي زر كيبورد -- # 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 Link to comment
iMr.Omar Posted November 24, 2015 Share Posted November 24, 2015 and isGuestAccount getPlayerAccount Link to comment
Me[Z]oO Posted November 24, 2015 Share Posted November 24, 2015 (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 November 24, 2015 by Guest Link to comment
iMr.Omar Posted November 24, 2015 Share Posted November 24, 2015 خطاً بالكلنت , ناقص اند Link to comment
Me[Z]oO Posted November 24, 2015 Share Posted November 24, 2015 خطاً بالكلنت , ناقص اند يسلمو ض1 كتبته علي السريع Link to comment
</Mr.Tn6eL> Posted November 24, 2015 Share Posted November 24, 2015 شوف اقترح لك تسوي اذ سجل دخولة يعطيه داتا واذ سجل خروجة يسحب الداتا بعدين بالكلنت استخدم حدث onClientElementDataChange عشان اول ماتتغير قيمة الداتا تفتح الزر او تغلقه Link to comment
Me[Z]oO Posted November 24, 2015 Share Posted November 24, 2015 شوف اقترح لك تسوي اذ سجل دخولة يعطيه داتا واذ سجل خروجة يسحب الداتا بعدين بالكلنت استخدم حدث onClientElementDataChange عشان اول ماتتغير قيمة الداتا تفتح الزر او تغلقه فكرة رائعة ما شاء الله ابدعت Link to comment
momar5700 Posted November 25, 2015 Author Share Posted November 25, 2015 انا مسوي في زر لما تضغط عليه كانك كتبت كلمة في اف8 المشكله اني ابي احط زر محد يقد ر يفتحة الا غيرررر بس كدا Link to comment
momar5700 Posted November 25, 2015 Author Share Posted November 25, 2015 شوف اقترح لك تسوي اذ سجل دخولة يعطيه داتا واذ سجل خروجة يسحب الداتا بعدين بالكلنت استخدم حدث onClientElementDataChange عشان اول ماتتغير قيمة الداتا تفتح الزر او تغلقه مش فاهم انا سويتها كدا صح ولا خطا كلنت 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 ) Link to comment
momar5700 Posted November 25, 2015 Author Share Posted November 25, 2015 اخر سوال كيف اسوي لوحة تفتحة لحساب معين او لمجموعة حسابات يعني ابيه مثلا تفتح لحسابي اني بس Link to comment
` Allawi Posted November 25, 2015 Share Posted November 25, 2015 if getAccount("example") then if getAccountName(getPlayerAccount(player)) == "example" then -- You are code end end Link to comment
ALw7sH Posted November 25, 2015 Share Posted November 25, 2015 if getAccount("example") then if getAccountName(getPlayerAccount(player)) == "example" then -- You are code end end getAccount? Link to comment
Me[Z]oO Posted November 25, 2015 Share Posted November 25, 2015 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 ) وش الي انت كاتبه ذا ؟ ^ Link to comment
` Allawi Posted November 25, 2015 Share Posted November 25, 2015 if getAccount("example") then if getAccountName(getPlayerAccount(player)) == "example" then -- You are code end end getAccount? يب يتحقق من وجود الحساب قبل التحقق من حساب اللاعب Link to comment
ALw7sH Posted November 25, 2015 Share Posted November 25, 2015 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 ? معى العلم ذا طلب صاحب الموضوع اخر سوالكيف اسوي لوحة تفتحة لحساب معين او لمجموعة حسابات يعني ابيه مثلا تفتح لحسابي اني بس Link to comment
` Allawi Posted November 25, 2015 Share Posted November 25, 2015 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) Link to comment
momar5700 Posted November 26, 2015 Author Share Posted November 26, 2015 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 و لما تفتحه ماتقدر تسوي اي شيء تلاقي زر مخفي علشان تضغط عليه لازم تكون معك رتبت Link to comment
momar5700 Posted November 26, 2015 Author Share Posted November 26, 2015 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) شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا شكرا Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now