Adham Posted July 9, 2016 Share Posted July 9, 2016 سلام عليكم. انا اليوم اقدر اسوي كل الكونسل يبقا له صوره فوق الراس؟ توضيح يعني : كل الكونسل معه صوره فوق راسه Link to comment
Me[Z]oO Posted July 9, 2016 Share Posted July 9, 2016 سلام عليكم.انا اليوم اقدر اسوي كل الكونسل يبقا له صوره فوق الراس؟ توضيح يعني : كل الكونسل معه صوره فوق راسه getElementsByType isObjectInACLGroup dxDrawImageOnElement Link to comment
Adham Posted July 9, 2016 Author Share Posted July 9, 2016 getElementsByType لكل الاعبين؟ Link to comment
' A F . Posted July 9, 2016 Share Posted July 9, 2016 Use This Functions Events Server : onResourceStart onPlayerLogin onPlayerLogout Functions Server getElementsByType getPlayerAccount getAccountName isGuestAccount isObjectInACLGroup setElementData removeElementData Client Event : onClientRender Client Functions : getElementData dxDrawImageOnElement Link to comment
a7zan Posted July 9, 2016 Share Posted July 9, 2016 استخدم فنكشن عبدالكريم getPlayersInGroup https://wiki.multitheftauto.com/wiki/GetPlayersInGroup Link to comment
Adham Posted July 9, 2016 Author Share Posted July 9, 2016 معلش الكود ذا فيه خطا يفتح للقروبات المحدهه function Strong ( ) guiSetVisible ( GUIEditor.window[1],true ) showCursor ( true ) -- اظهار الماوس guiSetInputEnabled ( true ) end addEvent ( "StrongTAG", true ) addEventHandler ( "StrongTAG", root, Strong ) group = { {"Console"}, {"Police"}, } bindKey ( "M", "down", function ( p ) local acc = getPlayerAccount(p) if not isGuestAccount ( acc ) then for i , v in ipairs ( group ) do if isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup(group)) then triggerClientEvent ( p, "StrongTAG", resourceRoot ) end end end ) Link to comment
Ahmed Ly Posted July 9, 2016 Share Posted July 9, 2016 group = { {"Console"}, {"Police"}, } bindKey ( "M", "down", function ( p ) local acc = getPlayerAccount(p) if not isGuestAccount ( acc ) then for i , v in ipairs ( group ) do if isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup(v[1])) then triggerClientEvent ("StrongTAG",p) end end end end ) Link to comment
Ahmed Ly Posted July 9, 2016 Share Posted July 9, 2016 --Client function Open() triggerServerEvent("gett",localPlayer) end bindKey( "M","down",Open) function Strong ( ) guiSetVisible ( GUIEditor.window[1],true ) showCursor ( true ) -- اظهار الماوس guiSetInputEnabled ( true ) end addEvent ( "StrongTAG", true ) addEventHandler ( "StrongTAG", root, Strong ) -------- ---Server local Groups = { { "Console"}, {"Police" }, } function isPlayerAdmin() for k,v in ipairs ( Groups ) do if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup(v[1])) ) then return true end end end addEvent("gett",true) addEventHandler("gett",root, function () if ( isPlayerAdmin (source) ) then triggerClientEvent("StrongTAG",source) end end ) Link to comment
Adham Posted July 9, 2016 Author Share Posted July 9, 2016 اشتغل لاكن بيجني WARNING: Police/Server.lua:19: Bad argument @ is objectinAclGroup' [expected acl-group at argument 2,got boolean] Link to comment
YourMind Posted July 9, 2016 Share Posted July 9, 2016 function Strong ( ) guiSetVisible ( GUIEditor.window[1],true ) showCursor ( true ) guiSetInputEnabled ( true ) end addEvent ( "StrongTAG", true ) addEventHandler ( "StrongTAG", root, Strong ) local Groups = { {"Console"}, {"Police"}, } function isPlayerAdmin(plr) for k,v in ipairs ( Groups ) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(plr)), aclGetGroup(v[1])) then break return true end end return false end function fu(plr) triggerClientEvent (plr,"StrongTAG",plr) end function c() if eventName == "onResourceStart" then for i,k in ipairs (getElementsByType("player")) do if isPlayerAdmin (k) then bindKey (k,"m","down",fu) end end else if isPlayerAdmin (source) then bindKey (source,"m","down",fu) end end end addEventHandler ("onResourceStart",resourceRoot,c) addEventHandler ("onPlayerLogin",root,c) Link to comment
Adham Posted July 9, 2016 Author Share Posted July 9, 2016 طيب الكود ذا addEvent("onDes",true) addEventHandler("onDes",root, function (player) local player = getPlayerFromName(player) local veh = getPedOccupiedVehicle(player) destroyElement(veh) exports.topbarchat:sendClientMessage("* [Police Panel]: Your Vehicle Destroy By " .. getPlayerName(source):gsub("#%x%x%x%x%x%x", ""),player,255,0,0) end ) يجي في الشات ونا مب في سياره انا ابيه م يجي في الشات غير ونا في سياره Link to comment
Adham Posted July 9, 2016 Author Share Posted July 9, 2016 طيب شكرا انا عامل لما لفل 5 يضعط علي button يجي كلام بالتوب بار شات للجميع بس لليضعط اللفل 5 فقط سرفر addEvent ( "Admin",true ) addEventHandler ( "Admin", root ) function ( ) if isObjectInACLGroup("user." .. getAccountName(source), aclGetGroup("Level 5")) then exports.topbarchat:sendClientMessage ( "#ffff00 * [Police Panel]: Organize compulsory police | تنظيم اجباري",root,255,255,255,true) end end ) كلنت addEventHandler("onClientGUIClick",root, function ( ) if source == GUIEditor.button[1] then triggerServerEvent("Admin",localPlayer) end end ) Link to comment
Ahmed Ly Posted July 9, 2016 Share Posted July 9, 2016 addEvent ( "Admin",true ) addEventHandler ( "Admin", root, function ( ) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 5")) then exports.topbarchat:sendClientMessage ( "#ffff00 * [Police Panel]: Organize compulsory police | تنظيم اجباري",root,255,255,255,true) end end ) Link to comment
N3xT Posted July 10, 2016 Share Posted July 10, 2016 استخدم isPlayerInVehicle This function is deprecated. This means that its use is discouraged and that it might not exist in future versions.Please use isPedInVehicle instead. الفنكشن ذا من المحتمل ما يكون موجود مستقبلاً لذلك من الأفضل إنه يستعمل isPedInVehicle 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