#1Topro Posted July 2, 2016 Share Posted July 2, 2016 سسلام عليكم شباب ابي كود يخلي اللوحة تفتح لرتب يعني انا مسوي لوحة شرطة بس المشكلة انها تفتح للكل ماعرفت اظبطها أبي الكود :] Link to comment
Anis Posted July 2, 2016 Share Posted July 2, 2016 (edited) مافي جاهز اعتمد على نفسسك Edited July 2, 2016 by Guest Link to comment
Mr.CoR Posted July 2, 2016 Share Posted July 2, 2016 isObjectInACLGroup + getAccountName getPlayerAccount aclGetGroup Link to comment
Adham Posted July 2, 2016 Share Posted July 2, 2016 (edited) سو جدول للوب guiSetVisible -- لظهار الوحه showCursor -- اظهار الماوس addEvent -- الحدث لسرفر addEventHandler -- الحدث #Server addCommandHandler -- الكلمه التبيها في ف8 او bindKey getPlayerAccount -- تجيب اسم حساب الاعب isGuestAccount -- تحقق لو الاعب غير مسجل for i, v in ipairs isObjectInACLGroup مثال للجدول -- Group = { "Console"}, {"Admin" } Edited July 2, 2016 by Guest Link to comment
Anis Posted July 2, 2016 Share Posted July 2, 2016 isObjectInACLGroup + getAccountName getPlayerAccount aclGetGroup ههههههه كنت بضيفهم اخطا دوست submit Link to comment
Anis Posted July 2, 2016 Share Posted July 2, 2016 سو جدول للوب guiSetVisible -- لظهار الوحه showCursor -- اظهار الماوس addEvent -- الحدث لسرفر addEventHandler -- الحدث #Server addCommandHandler -- الكلمه التبيها في ف8 او bindKey getPlayerAccount -- تجيب اسم حساب الاعب isGuestAccount -- تحقق لو الاعب غير مسجل for i, v in ipairs isObjectInACLGroup مثال للجدول -- Group = { "Console"}, {"Admin" } يقدر هكذا ض local Group = "Console, admin" Link to comment
Kara Posted July 2, 2016 Share Posted July 2, 2016 (edited) bindKey( "F1",down",keyopen) function keyopen() triggerServerEvent("ifpolice",localPlayer) end addEvent("done",true) addEventHandler("done",root, function () if guiGetVisible( GUIEditor.staticimage[1]) then guiSetVisible( GUIEditor.staticimage[1],false) showCursor(false) else guiSetVisible( GUIEditor.staticimage[1],true) showCursor(true) end end ) ----------server Ggroup = ("Admin") addEvent("ifpolice",true) addEventHandler("ifpolice",root, function () if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup(Ggroup)) then triggerClientEvent(source,"done",source) end end ) Edited July 2, 2016 by Guest Link to comment
Anis Posted July 2, 2016 Share Posted July 2, 2016 bindKey( "F1",down",keyopen) function keyopen() triggerServerEvent("ifpolice",localPlayer) end addEvent("done",true) addEventHandler("done",root, function () if guiGetVisible( GUIEditor.staticimage[1]) then guiSetVisible( GUIEditor.staticimage[1],false) showCursor(false) else guiSetVisible( GUIEditor.staticimage[1],true) showCursor(true) GetPlayersInList() end end ) ----------server Ggroup = ("Admin") addEvent("ifpolice",true) addEventHandler("ifpolice",root, function () if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup(Ggroup)) then triggerClientEvent(source,"done",source) end end ) كنا نعطيه سهل خلي الرجال يحاول في خطا التصليح bindKey( "F1","down",keyopen) function keyopen() triggerServerEvent("ifpolice",localPlayer) end addEvent("done",true) addEventHandler("done",root, function () if guiGetVisible( GUIEditor.staticimage[1]) then guiSetVisible( GUIEditor.staticimage[1],false) showCursor(false) else guiSetVisible( GUIEditor.staticimage[1],true) showCursor(true) GetPlayersInList() end end ) ----------server Ggroup = ("Admin") addEvent("ifpolice",true) addEventHandler("ifpolice",root, function () if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup(Ggroup)) then triggerClientEvent(source,"done",source) end end ) Link to comment
Adham Posted July 2, 2016 Share Posted July 2, 2016 (edited) addEvent("ifpolice",true) addEventHandler("ifpolice",root, function () if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup(Ggroup)) then triggerClientEvent(source,"done",source) end end ) إلي سرفر bindKey( "F1","down", function ( p ) local acc = getPlayerAccount(p) if not isGuestAccount ( acc ) then if isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup(Ggroup)) then triggerClientEvent ( p, "Done", resourceRoot ) end end end ) كلنت function Strong ( ) guiSetVisible ( GUIEditor.window[1],true ) showCursor ( true ) -- اظهار الماوس guiSetInputEnabled ( true ) end addEvent ( "Done", true ) addEventHandler ( "Done", root, Strong ) Edited July 2, 2016 by Guest Link to comment
فاّرس Posted July 2, 2016 Share Posted July 2, 2016 addEvent("ifpolice",true) addEventHandler("ifpolice",root, function () if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup(Ggroup)) then triggerClientEvent(source,"done",source) end end ) إلي سرفر bindKey( "F1","down", function ( p ) local acc = getPlayerAccount(p) if not isGuestAccount ( acc ) then if isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup(Ggroup)) then triggerClientEvent ( p, "Done", resourceRoot ) end end end ) كلنت function Strong ( ) guiSetVisible ( GUIEditor.window[1],true ) showCursor ( true ) -- اظهار الماوس guiSetInputEnabled ( true ) end addEvent ( "Done", true ) addEventHandler ( "Done", root, Strong ) بالتريقر شوضعها يعني؟ resourceRoot بالسيرفر لازم تحط ارقومنت اللاعب ولازم تفعل الزر اذا السكربت اشتغل واذا دخل اللاعب عشان ما تصير مشاكل + ذي bindKey اذا بتستخدم Link to comment
SycroX Posted July 2, 2016 Share Posted July 2, 2016 local AdminsGroup = { "Console", "Admin" } function isPlayerAdmin(player) if isGuestAccount(getPlayerAccount(player)) then return end for k,v in ipairs ( AdminsGroup ) do if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) ) then return true end end end --Ex : addCommandHandler("cheak", function(plr) if isPlayerAdmin(plr) == true then outputChatBox("You Are Admin : )", plr, 255, 0, 0, true) else outputChatBox("You Aren't Admin : (", plr, 255, 0, 0, true) end end) Link to comment
MR.GRAND Posted July 2, 2016 Share Posted July 2, 2016 سو جدول للوب guiSetVisible -- لظهار الوحه showCursor -- اظهار الماوس addEvent -- الحدث لسرفر addEventHandler -- الحدث #Server addCommandHandler -- الكلمه التبيها في ف8 او bindKey getPlayerAccount -- تجيب اسم حساب الاعب isGuestAccount -- تحقق لو الاعب غير مسجل for i, v in ipairs isObjectInACLGroup مثال للجدول -- Group = { "Console"}, {"Admin" } يقدر هكذا ض local Group = "Console, [color=#FF0000]admin[/color]" بس للتوضيح هالطريقة مارح يقدر يضيف اكثر من رتبة يعني بهذي الحالة الرتبة اللي بالبداية فقط اللي راح تنعطي صلاحيات الشيء الاشياء اللي بعدها مثلا ادمن وغيرها مارح يقرأها الكود ولا راح يتطبق عليها شيء ^ كلام عن تجربة لا اكثر Link to comment
' A F . Posted July 2, 2016 Share Posted July 2, 2016 ^ اتوقع يقدر يسويها بـ استخدم split Ex: local text = "Admin,Console,Support,Everyone" for i=1,4 do local Rank = split (text,",") outputChatBox(Rank[i]) end 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