DaminkO Posted April 16, 2016 Share Posted April 16, 2016 ابي الفنكشن الي تجي فوق راس اللاعب رتبته Link to comment
Jupi Posted April 16, 2016 Share Posted April 16, 2016 https://wiki.multitheftauto.com/wiki/Dx ... eOnElement Link to comment
Dominate Posted April 17, 2016 Share Posted April 17, 2016 https://wiki.multitheftauto.com/wiki/Dx ... tOnElement Link to comment
Ja[B]er[X]Pro Posted April 17, 2016 Share Posted April 17, 2016 (edited) دا مثال سويته لك الاكواد التي وضعت فوقهم --[[useful Function]]-- لا تعدلهم اما الاكواد التي تحت --[ ]-- عدلها كما تبيserver[xml] --[[useful Function]]-- function isPlayerInACL ( player, acl ) local account = getPlayerAccount ( player ) if ( isGuestAccount ( account ) ) then return false end return isObjectInACLGroup ( "user."..getAccountName ( account ), aclGetGroup ( acl ) ) end --[[Code]]-- addEvent("groupacl",true) addEventHandler("groupacl",root,function() if isPlayerInACL(localPlayer,"Console") then triggerEventClient("text",source) end end) [/xml]client[xml] --[[useful Function]]-- function dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font,checkBuildings,checkVehicles,checkPeds,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getElementPosition(localPlayer) local distance = distance or 20 local height = height or 1 local checkBuildings = checkBuildings or true local checkVehicles = checkVehicles or false local checkPeds = checkPeds or false local checkObjects = checkObjects or true local checkDummies = checkDummies or true local seeThroughStuff = seeThroughStuff or false local ignoreSomeObjectsForCamera = ignoreSomeObjectsForCamera or false local ignoredElement = ignoredElement or nil if (isLineOfSightClear(x, y, z, x2, y2, z2, checkBuildings, checkVehicles, checkPeds , checkObjects,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "arial", "center", "center") end end end end --[[Code]]-- addEvent("text",true) addEventHandler("text",root,function() dxDrawTextOnElement(localPlayer,"Console",1,20,0,0,255,255,1,"arial") end) addEventHandler("onClientRender",root,function() triggerServerEvent("groupacl",localPlayer) end) [/xml]اسف ان يوجد خطأ Edited April 17, 2016 by Guest Link to comment
#|_oskar_|# Posted April 17, 2016 Share Posted April 17, 2016 دا مثال سويته لكلا تهتم للاكواد التي فوق المهم فقط هو اخر كود الاكواد غير مجربه --[[useful Function]]-- function isPlayerInACL ( player, acl ) local account = getPlayerAccount ( player ) if ( isGuestAccount ( account ) ) then return false end return isObjectInACLGroup ( "user."..getAccountName ( account ), aclGetGroup ( acl ) ) end function dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font,checkBuildings,checkVehicles,checkPeds,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getElementPosition(localPlayer) local distance = distance or 20 local height = height or 1 local checkBuildings = checkBuildings or true local checkVehicles = checkVehicles or false local checkPeds = checkPeds or false local checkObjects = checkObjects or true local checkDummies = checkDummies or true local seeThroughStuff = seeThroughStuff or false local ignoreSomeObjectsForCamera = ignoreSomeObjectsForCamera or false local ignoredElement = ignoredElement or nil if (isLineOfSightClear(x, y, z, x2, y2, z2, checkBuildings, checkVehicles, checkPeds , checkObjects,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "arial", "center", "center") end end end end --[[Code]]-- addEventHandler("onClientRender",root,function() if isPlayerInACL(localPlayer,"Console") then dxDrawTextOnElement(localPlayer,"Console",1,20,255,255,0,255,"arial") end end) اسف ان يوجد خطأ غلط ماينفع كلنت على سيرفر Link to comment
Ja[B]er[X]Pro Posted April 17, 2016 Share Posted April 17, 2016 دا مثال سويته لكلا تهتم للاكواد التي فوق المهم فقط هو اخر كود الاكواد غير مجربه --[[useful Function]]-- function isPlayerInACL ( player, acl ) local account = getPlayerAccount ( player ) if ( isGuestAccount ( account ) ) then return false end return isObjectInACLGroup ( "user."..getAccountName ( account ), aclGetGroup ( acl ) ) end function dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font,checkBuildings,checkVehicles,checkPeds,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getElementPosition(localPlayer) local distance = distance or 20 local height = height or 1 local checkBuildings = checkBuildings or true local checkVehicles = checkVehicles or false local checkPeds = checkPeds or false local checkObjects = checkObjects or true local checkDummies = checkDummies or true local seeThroughStuff = seeThroughStuff or false local ignoreSomeObjectsForCamera = ignoreSomeObjectsForCamera or false local ignoredElement = ignoredElement or nil if (isLineOfSightClear(x, y, z, x2, y2, z2, checkBuildings, checkVehicles, checkPeds , checkObjects,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "arial", "center", "center") end end end end --[[Code]]-- addEventHandler("onClientRender",root,function() if isPlayerInACL(localPlayer,"Console") then dxDrawTextOnElement(localPlayer,"Console",1,20,255,255,0,255,"arial") end end) اسف ان يوجد خطأ غلط ماينفع كلنت على سيرفر اها شكراً اسف ما انتبهت بعدله Link to comment
Jupi Posted April 17, 2016 Share Posted April 17, 2016 كود لتأكد من قروب لاعب بالكلنتتم تعديل الكود كلنت function isPlayerGroupName(grp) triggerServerEvent ( "onServerIsRG", getLocalPlayer(),getLocalPlayer(), grp) if getElementData(getLocalPlayer(),"IsRG") == tostring(grp) then return true end return false end سيرفر function OSF (pla, grp ) if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(pla)), aclGetGroup ( tostring(grp) ) ) then setElementData(pla,"IsRG",tostring(grp)) else setElementData(pla,"IsRG","noG") end end addEvent( "onServerIsRG", true ) addEventHandler( "onServerIsRG", getRootElement(), OSF ) مثآل GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(0,0,542,374," ",false) GUIEditor_TabPanel[3] = guiCreateTabPanel(9,24,524,341,false,GUIEditor_Window[1]) GUIEditor_Tab[3] = guiCreateTab(" ",GUIEditor_TabPanel[3]) GUIEditor_TabPanel[4] = guiCreateTabPanel(135,151,5,5,false,GUIEditor_Tab[3]) GUIEditor_Tab[5] = guiCreateTab(" ",GUIEditor_TabPanel[3]) closeButton = guiCreateButton(480,5,36,23,"~[x]~",false,GUIEditor_Tab[3]) guiSetVisible ( GUIEditor_Window[1], false ) bindKey( "F2", "down", function ( ) if isPlayerGroupName("POLICE") then guiSetVisible ( GUIEditor_Window[1],true) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) guiSetInputEnabled( guiGetVisible ( GUIEditor_Window[1] ) ) else outputChatBox("no In Group") end 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