Jump to content

#|_oskar_|#

Members
  • Posts

    897
  • Joined

  • Last visited

Everything posted by #|_oskar_|#

  1. كلنت addEventHandler("onClientGUIClick",jail,function () triggerServerEvent("exe",localPlayer) end,false) سيرفر addEvent("exe",true) addEventHandler("exe",root,function () executeCommandHandler("jail",source) end) ملاحظه : يمكن تحتاج تضيفه لقروب الادمن
  2. كودي كلنكت اقصد الامر اللى تكتبه ب اف 8 بجانب سيرفر ولا كلنت ؟
  3. طلبك الاول getPlayerSerial طلبك الثاني guiGetText -- تجيب الكلام من الايديت الاول guiSetText -- وتحطه بالايديت الثاني
  4. اذا كودك سيرفر مراح يضبط سوي ترايقر من كلنت لسيرفر
  5. GUIEditor = { button = {}, window = {}, label = {}, edit = {}} local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 315) / 2, (screenH - 168) / 2, 315, 168, ":: تاج في الشات ::", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFF1BE0D") GUIEditor.edit[1] = guiCreateEdit(100, 38, 177, 20, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(100, 107, 177, 20, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(14, 39, 72, 19, " -< التاج >- ", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(4, 108, 90, 19, "-< لون الكلام >-", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(306, 24, 0, 15, "", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(283, 24, 23, 19, "X", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFFFFFF") GUIEditor.button[3] = guiCreateButton(10,140, 95, 17, "-< تفعيل التاج >-", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFFFFFF") GUIEditor.button[4] = guiCreateButton(10+95, 140, 95, 17, "-< حذف التاج >-", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFFFF") GUIEditor.label[3] = guiCreateLabel(104, 68, 140, 15, "~~~~~~~~~", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], "sa-gothic") guiLabelSetColor(GUIEditor.label[3], 239, 200, 21) GUIEditor.label[4] = guiCreateLabel(100, 88, 186, 15, "مثال لون التاج >> الاحمر FF0000#", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[4], 254, 254, 254) GUIEditor.label[5] = guiCreateLabel(204, 141, 117, 17, "Created By #Saed", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[5], 254, 5, 5) ----- addEventHandler("onClientGUIClick",root,function() if(source == GUIEditor.button[3]) then if guiGetText (GUIEditor.edit[1]) ~= '' then setElementData (localPlayer,'tag',guiGetText (GUIEditor.edit[1])) end elseif(source == GUIEditor.button[4]) then setElementData (localPlayer,'tag',false) end end) --- addEventHandler("onPlayerChat",root,function (msg) local tag = getElementData(source,"tag") or 'Guest' outputChatBox(tag ..' '.. getPlayerName(source) .. ' : '.. msg,root, r, g, b, true) return cancelEvent() end)
  6. احسبك عايز تضيف زر للوحه بالنسبه للتحد التشيك بوكس if guiCheckBoxGetSelected(GUIEditor.checkbox[5]) == true then guiSetVisible( GUIEditor.window[1], true) -- لو حددت ع التشيك بوكس يفتح اللوحه end if guiCheckBoxGetSelected(GUIEditor.checkbox[5]) == false then guiSetVisible( GUIEditor.window[1], false) -- لو شيلت التحديد يقفل اللوحه end
  7. صوره تكسد ولا ؟
  8. GUIEditor = { button = {}, window = {}, label = {}, edit = {} } addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 315) / 2, (screenH - 168) / 2, 315, 168, ":: تاج في الشات ::", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFF1BE0D") GUIEditor.edit[1] = guiCreateEdit(100, 38, 177, 20, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(100, 107, 177, 20, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(14, 39, 72, 19, " -< التاج >- ", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(4, 108, 90, 19, "-< لون الكلام >-", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(306, 24, 0, 15, "", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(283, 24, 23, 19, "X", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFFFFFF") GUIEditor.button[3] = guiCreateButton(10,140, 95, 17, "-< تفعيل التاج >-", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFFFFFF") GUIEditor.button[4] = guiCreateButton(10+95, 140, 95, 17, "-< حذف التاج >-", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFFFF") GUIEditor.label[3] = guiCreateLabel(104, 68, 140, 15, "~~~~~~~~~", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], "sa-gothic") guiLabelSetColor(GUIEditor.label[3], 239, 200, 21) GUIEditor.label[4] = guiCreateLabel(100, 88, 186, 15, "مثال لون التاج >> الاحمر FF0000#", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[4], 254, 254, 254) GUIEditor.label[5] = guiCreateLabel(204, 141, 117, 17, "Created By #Saed", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[5], 254, 5, 5) end )
  9. setElementData getElementData
  10. يكتب حسابه ؟ ولا يحفظ على حسابه
  11. 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 addEventHandler("onClientRender",root,function () dxDrawTextOnElement(localPlayer,getElementData ( root, "MASRIY" ) or 'none',1,20,0,0,255,255,1,"arial") end) local Groups = { {'Console','صاحب السيرفر'}, {'Admin','ادمن'}, } addEventHandler("onPlayerLogin", root,function () for _,v in ipairs ( Groups ) do if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup(v[1])) ) then setElementData ( root, "MASRIY",v[2]) return true end end end) addEventHandler("onPlayerLogout", root,function () setElementData ( root, "MASRIY",false) end)
  12. وضح طلبك اكثر ؟
  13. اطرح كود اللوحه
  14. عشان تحفظ الكلام بالقريد استخدم executeSQLQuery
  15. كودك صحيح بس اتاكد من اسم الزر او اسم القريد
  16. مثال ثاني عشان تفهم اكثر addEventHandler ( "onClientGUIClick",root,function () if source == button then local row = guiGridListAddRow (GRID) t1,t2,t3 = guiGetText(edit1),guiGetText(edit2),guiGetText(edit3) if t1 ~= "" and t2 ~= "" and t3 ~= "" then guiGridListSetItemText (GRID,row,1,t1,false,false) guiGridListSetItemText (GRID,row,2,t2,false,false) guiGridListSetItemText (GRID,row,3,t3,false,false) outputChatBox ( "تم اضافة الكلام") return end outputChatBox ( "اكتب اي شئ بالايديت") end end)
  17. كمل انت الباقي guiGridListSetItemText (GRID,row,Column1,guiGetText(Edit1),false,false) guiGridListSetItemText (GRID,row,Column2,guiGetText(Edit2),false,false) guiGridListSetItemText (GRID,row,Column3,guiGetText(Edit3),false,false)
  18. ان شاء الله تفهم من الشرح دا local x1,y1,z1 = 2505,-1658,14 --- احداثيات البدايه local x2,y2,z2 = 2202,-1653,102 --- احداثيات النهايه local rot1 = 0 --- الدوران عند بدء الكاميرا local rot2 = 7000 ---الدوران عند انتهاء الكاميرا local Speed = 5000 --- سرعة الكاميرا smoothMoveCamera (x1,y1,z1,rot1,0,0,x2,y2,z2,rot2,0,0,Speed)
  19. عدل ع الاحداثيات مسوي لى الاحداثيات بنفس المكان وتقول ماتتحرك واجوبه خاطئه
  20. local sm = {} sm.moov = 0 sm.object1,sm.object2 = nil,nil local function removeCamHandler() if(sm.moov == 1)then sm.moov = 0 end end local function camRender() if (sm.moov == 1) then local x1,y1,z1 = getElementPosition(sm.object1) local x2,y2,z2 = getElementPosition(sm.object2) setCameraMatrix(x1,y1,z1,x2,y2,z2) end end addEventHandler("onClientPreRender",root,camRender) function smoothMoveCamera(x1,y1,z1,x1t,y1t,z1t,x2,y2,z2,x2t,y2t,z2t,time) if(sm.moov == 1)then return false end sm.object1 = createObject(1337,x1,y1,z1) sm.object2 = createObject(1337,x1t,y1t,z1t) setElementAlpha(sm.object1,0) setElementAlpha(sm.object2,0) setObjectScale(sm.object1,0.01) setObjectScale(sm.object2,0.01) moveObject(sm.object1,time,x2,y2,z2,0,0,0,"InOutQuad") moveObject(sm.object2,time,x2t,y2t,z2t,0,0,0,"InOutQuad") sm.moov = 1 setTimer(removeCamHandler,time,1) setTimer(destroyElement,time,1,sm.object1) setTimer(destroyElement,time,1,sm.object2) return true end ----------------- smoothMoveCamera ( 2882, 1790, 31, 2899, 1789, 28, 2897, 1794, 28, 2884, 1785, 28, 2000)
  21. هو الاوبجكت بس ناسي الايدي حقه
  22. حاول تسويه getElementPosition -- تجيب احداثيات السياره createObject -- تسوي انشاء للاوبجكت عشان تظهر الدخان attachElements -- تلصق الاوبجكت بالسياره
  23. مشكلتك تتطلب وتاخذ جاهز بس ماتفهم للاكواد المفروض تتعلم من الجاهز وتعتمد على نفسك وطلبك ذا انت طالبه قبل كذا يمكن عشر مرات حاول تتعلم يااخي حرام عليك
×
×
  • Create New...