Jump to content

Abdul KariM

Members
  • Posts

    2,711
  • Joined

  • Days Won

    42

Everything posted by Abdul KariM

  1. يعطيك العافية , مانتبهت لها وكتبته عالسريع تم التعديل
  2. Client : local sx, sy = guiGetScreenSize() localPlayer = getLocalPlayer() local visible = false local key = "F7" local neonname = { [1] = "Rotes Neon", [2] = "Blaues Neon", [3] = "Grünes Neon", [4] = "Gelbes Neon", [5] = "Pinkes Neon", [6] = "Weisses Neon", [7] = "Kein Neon" } local idModel = { [1] = 14399, [2] = 14400, [3] = 14401, [4] = 14402, [5] = 14403, [6] = 14404 } function openGui() local xBtn = 75 local yBtn = 30 local wBtn = 150 local hBtn = 21 local space = 28 window = guiCreateWindow(sx/2-150,sy/2-115,300,260,"Neon Panel",false) Btn1 = guiCreateButton(xBtn,yBtn,wBtn,hBtn,neonname[1],false, window) Btn2 = guiCreateButton(xBtn,yBtn+space,wBtn,hBtn,neonname[2],false, window) Btn3 = guiCreateButton(xBtn,yBtn+2*space,wBtn,hBtn,neonname[3],false, window) Btn4 = guiCreateButton(xBtn,yBtn+3*space,wBtn,hBtn,neonname[4],false, window) Btn5 = guiCreateButton(xBtn,yBtn+4*space,wBtn,hBtn,neonname[5],false, window) Btn6 = guiCreateButton(xBtn,yBtn+5*space,wBtn,hBtn,neonname[6],false, window) Btn7 = guiCreateButton(xBtn,yBtn+6*space,wBtn,hBtn,neonname[7],false, window) info = guiCreateLabel(200, 230, 300, 30,"By Huarycane", false, window) guiLabelSetColor (info, 0,0,255) guiSetVisible(window, visible) end function start_cl_resource() openGui() if ( guiGetVisible(window) == true ) then showCursor(true) end end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),start_cl_resource) function hideGui() triggerServerEvent ( "PlayerVip" , localPlayer ) end bindKey(key, "down", hideGui) addEvent ( "OpenPanel" , true ) addEventHandler ( "OpenPanel" , root , function ( ) if (guiGetVisible(window) == false) then guiSetVisible(window, true) showCursor(true) else guiSetVisible(window, false) showCursor(false) end end ) function onGuiClickPanel (button, state, absoluteX, absoluteY) if (source == Btn1) then setElementData( localPlayer, "neon", idModel[1] ) local theVehicle = getPedOccupiedVehicle ( localPlayer ) triggerServerEvent ("detachNeon", getLocalPlayer(), theVehicle) triggerServerEvent ("attachNeon", getLocalPlayer(), theVehicle) elseif (source == Btn2) then setElementData( localPlayer, "neon", idModel[2] ) local theVehicle = getPedOccupiedVehicle ( localPlayer ) triggerServerEvent ("detachNeon", getLocalPlayer(), theVehicle) triggerServerEvent ("attachNeon", getLocalPlayer(), theVehicle) elseif (source == Btn3) then setElementData( localPlayer, "neon", idModel[3] ) local theVehicle = getPedOccupiedVehicle ( localPlayer ) triggerServerEvent ("detachNeon", getLocalPlayer(), theVehicle) triggerServerEvent ("attachNeon", getLocalPlayer(), theVehicle) elseif (source == Btn4) then setElementData( localPlayer, "neon", idModel[4] ) local theVehicle = getPedOccupiedVehicle ( localPlayer ) triggerServerEvent ("detachNeon", getLocalPlayer(), theVehicle) triggerServerEvent ("attachNeon", getLocalPlayer(), theVehicle) elseif (source == Btn5) then setElementData( localPlayer, "neon", idModel[5] ) local theVehicle = getPedOccupiedVehicle ( localPlayer ) triggerServerEvent ("detachNeon", getLocalPlayer(), theVehicle) triggerServerEvent ("attachNeon", getLocalPlayer(), theVehicle) elseif (source == Btn6) then setElementData( localPlayer, "neon", idModel[6] ) local theVehicle = getPedOccupiedVehicle ( localPlayer ) triggerServerEvent ("detachNeon", getLocalPlayer(), theVehicle) triggerServerEvent ("attachNeon", getLocalPlayer(), theVehicle) elseif (source == Btn7) then setElementData( localPlayer, "neon", 0 ) local theVehicle = getPedOccupiedVehicle ( localPlayer ) triggerServerEvent ("detachNeon", getLocalPlayer(), theVehicle) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClickPanel) function replaceTXD() txd = engineLoadTXD ( "models/MatTextures.txd" ) engineImportTXD ( txd, idModel[1] ) engineImportTXD ( txd, idModel[2] ) engineImportTXD ( txd, idModel[3] ) engineImportTXD ( txd, idModel[4] ) engineImportTXD ( txd, idModel[5] ) engineImportTXD ( txd, idModel[6] ) col = engineLoadCOL("models/RedNeonTube1.col") engineReplaceCOL(col, idModel[1]) col = engineLoadCOL("models/BlueNeonTube1.col") engineReplaceCOL(col, idModel[2]) col = engineLoadCOL("models/GreenNeonTube1.col") engineReplaceCOL(col, idModel[3]) col = engineLoadCOL("models/YellowNeonTube1.col") engineReplaceCOL(col, idModel[4]) col = engineLoadCOL("models/PinkNeonTube1.col") engineReplaceCOL(col, idModel[5]) col = engineLoadCOL("models/WhiteNeonTube1.col") engineReplaceCOL(col, idModel[6]) dff = engineLoadDFF ( "models/RedNeonTube1.dff", idModel[1] ) engineReplaceModel ( dff, idModel[1] ) dff = engineLoadDFF ( "models/BlueNeonTube1.dff", idModel[2] ) engineReplaceModel ( dff, idModel[2] ) dff = engineLoadDFF ( "models/GreenNeonTube1.dff", idModel[3] ) engineReplaceModel ( dff, idModel[3] ) dff = engineLoadDFF ( "models/YellowNeonTube1.dff", idModel[4] ) engineReplaceModel ( dff, idModel[4] ) dff = engineLoadDFF ( "models/PinkNeonTube1.dff", idModel[5] ) engineReplaceModel ( dff, idModel[5] ) dff = engineLoadDFF ( "models/WhiteNeonTube1.dff", idModel[6] ) engineReplaceModel ( dff, idModel[6] ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceTXD) Server : local vehicles = { [ 400 ] = true, [ 401 ] = true, [ 402 ] = true, [ 403 ] = true, [ 404 ] = true, [ 405 ] = true, [ 409 ] = true, [ 410 ] = true, [ 415 ] = true, [ 411 ] = true, [ 412 ] = true, [ 413 ] = true, [ 415 ] = true, [ 416 ] = true, [ 418 ] = true, [ 419 ] = true, [ 420 ] = true, [ 421 ] = true, [ 422 ] = true, [ 423 ] = true, [ 426 ] = true, [ 428 ] = true, [ 429 ] = true, [ 431 ] = true, [ 434 ] = true, [ 436 ] = true, [ 437 ] = true, [ 438 ] = true, [ 439 ] = true, [ 440 ] = true, [ 442 ] = true, [ 445 ] = true, [ 446 ] = true, [ 451 ] = true, [ 458 ] = true, [ 459 ] = true, [ 466 ] = true, [ 467 ] = true, [ 470 ] = true, [ 474 ] = true, [ 475 ] = true, [ 477 ] = true, [ 479 ] = true, [ 480 ] = true, [ 482 ] = true, [ 483 ] = true, [ 489 ] = true, [ 490 ] = true, [ 491 ] = true, [ 492 ] = true, [ 494 ] = true, [ 495 ] = true, [ 496 ] = true, [ 498 ] = true, [ 499 ] = true, [ 500 ] = true, [ 502 ] = true, [ 503 ] = true, [ 504 ] = true, [ 505 ] = true, [ 506 ] = true, [ 507 ] = true, [ 508 ] = true, [ 516 ] = true, [ 517 ] = true, [ 518 ] = true, [ 525 ] = true, [ 526 ] = true, [ 527 ] = true, [ 528 ] = true, [ 529 ] = true, [ 533 ] = true, [ 534 ] = true, [ 535 ] = true, [ 536 ] = true, [ 540 ] = true, [ 541 ] = true, [ 542 ] = true, [ 543 ] = true, [ 545 ] = true, [ 546 ] = true, [ 547 ] = true, [ 549 ] = true, [ 550 ] = true, [ 551 ] = true, [ 552 ] = true, [ 554 ] = true, [ 555 ] = true, [ 558 ] = true, [ 559 ] = true, [ 560 ] = true, [ 561 ] = true, [ 562 ] = true, [ 565 ] = true, [ 566 ] = true, [ 567 ] = true, [ 568 ] = true, [ 575 ] = true, [ 576 ] = true, [ 579 ] = true, [ 580 ] = true, [ 582 ] = true, [ 585 ] = true, [ 587 ] = true, [ 588 ] = true, [ 589 ] = true, [ 596 ] = true, [ 597 ] = true, [ 598 ] = true, [ 599 ] = true, [ 600 ] = true, [ 602 ] = true, [ 603 ] = true, [ 604 ] = true, [ 605 ] = true, [ 609 ] = true } function neons (theVehicle) local NeonType = getElementData(source, "neon") if not NeonType or ( NeonType == 0 ) then return end local x, y, z = getElementPosition ( theVehicle ) if not x or not y or not z then return end local id = getElementModel ( theVehicle ) if ( vehicles [ id ] ) then local neon = createObject ( NeonType, x, y, z ) local neon1 = createObject ( NeonType, x, y, z ) local neon2 = createObject ( NeonType, x, y, z ) local neon3 = createObject ( NeonType, x, y, z ) if ( id == 401 ) then destroyElement(neon2) destroyElement(neon3) attachElements ( neon1, theVehicle or source, 0.9, 0, -0.55 ) attachElements ( neon, theVehicle or source, -0.9, 0, -0.55 ) elseif ( id == 411 ) then attachElements ( neon3, theVehicle or source, 0, 1.25, -0.63, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -1.25, -0.63, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.95, 0, -0.63 ) attachElements ( neon, theVehicle or source, -0.95, 0, -0.63 ) elseif ( id == 416 ) then attachElements ( neon3, theVehicle or source, 0, 1.55, -0.67, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -1.55, -0.73, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.9, 0, -0.7 ) attachElements ( neon, theVehicle or source, -0.9, 0, -0.7 ) elseif ( id == 422 ) then destroyElement(neon2) destroyElement(neon3) attachElements ( neon1, theVehicle or source, 0.85, 0, -0.66 ) attachElements ( neon, theVehicle or source, -0.85, 0, -0.66 ) elseif ( id == 429 ) then destroyElement(neon2) destroyElement(neon3) attachElements ( neon1, theVehicle or source, 0.9, 0, -0.51 ) attachElements ( neon, theVehicle or source, -0.9, 0, -0.51 ) elseif ( id == 445 ) then attachElements ( neon3, theVehicle or source, 0, 1.1, -0.55, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -1.15, -0.55, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.95, 0, -0.55 ) attachElements ( neon, theVehicle or source, -0.95, 0, -0.55 ) elseif ( id == 459 ) then destroyElement(neon2) destroyElement(neon3) attachElements ( neon1, theVehicle or source, 0.8, 0, -0.78 ) attachElements ( neon, theVehicle or source, -0.8, 0, -0.78 ) elseif ( id == 498 ) or ( id == 609 ) then attachElements ( neon3, theVehicle or source, 0, 1.65, -0.7, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -1.2, -0.7, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 1.1, 0, -0.7 ) attachElements ( neon, theVehicle or source, -1.1, 0, -0.7 ) elseif ( id == 499 ) or ( id == 498 ) then destroyElement(neon2) destroyElement(neon3) attachElements ( neon1, theVehicle or source, 0.8, 0, -0.6 ) attachElements ( neon, theVehicle or source, -0.8, 0, -0.6 ) elseif ( id == 504 ) then attachElements ( neon3, theVehicle or source, 0, 1.1, -0.55, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -1.15, -0.55, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.95, 0, -0.55) attachElements ( neon, theVehicle or source, -0.95, 0, -0.55 ) elseif ( id == 575 ) then attachElements ( neon3, theVehicle or source, 0, 1.3, -0.38, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -1.25, -0.38, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.9, 0, -0.38) attachElements ( neon, theVehicle or source, -0.9, 0, -0.38 ) elseif ( id == 535 ) or ( id == 536 ) then attachElements ( neon3, theVehicle or source, 0, 1.1, -0.6, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -1.15, -0.6, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.95, 0, -0.6 ) attachElements ( neon, theVehicle or source, -0.95, 0, -0.6 ) elseif ( id == 496 ) then destroyElement(neon2) destroyElement(neon3) attachElements ( neon1, theVehicle or source, 0.85, 0, -0.5 ) attachElements ( neon, theVehicle or source, -0.85, 0, -0.5 ) elseif ( id == 568 ) then destroyElement(neon1) destroyElement(neon2) destroyElement(neon3) attachElements ( neon, theVehicle or source, 0, 0.45, -0.42 ) elseif ( id == 602 ) then attachElements ( neon3, theVehicle or source, 0, 1.05, -0.6, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -1.05, -0.6, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.95, 0, -0.6 ) attachElements ( neon, theVehicle or source, -0.95, 0, -0.6 ) elseif ( id == 518 ) then attachElements ( neon3, theVehicle or source, 0, 1.3, -0.5, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -1.05, -0.5, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.95, 0.15, -0.5 ) attachElements ( neon, theVehicle or source, -0.95, 0.15, -0.5 ) elseif ( id == 402 ) then destroyElement(neon2) destroyElement(neon3) attachElements ( neon1, theVehicle or source, 1, 0, -0.63 ) attachElements ( neon, theVehicle or source, -1, 0, -0.63 ) elseif ( id == 541 ) then destroyElement(neon2) destroyElement(neon3) attachElements ( neon1, theVehicle or source, 0.9, 0, -0.45 ) attachElements ( neon, theVehicle or source, -0.9, 0, -0.45 ) elseif ( id == 482 ) then attachElements ( neon3, theVehicle or source, 0, 1.25, -0.82, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -1.25, -0.82, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.95, 0.05, -0.82 ) attachElements ( neon, theVehicle or source, -0.95, 0.05, -0.82 ) elseif ( id == 438 ) then attachElements ( neon3, theVehicle or source, 0, 1.25, -0.72, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -1.3, -0.72, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.95, 0, -0.72 ) attachElements ( neon, theVehicle or source, -0.95, 0, -0.72 ) elseif ( id == 527 ) then destroyElement(neon2) destroyElement(neon3) attachElements ( neon1, theVehicle or source, 0.92, 0.15, -0.47 ) attachElements ( neon, theVehicle or source, -0.92, 0.15, -0.47 ) elseif ( id == 483 ) then attachElements ( neon3, theVehicle or source, 0.85, -0.48, -0.80 ) attachElements ( neon2, theVehicle or source, -0.85, -0.48, -0.80 ) attachElements ( neon1, theVehicle or source, 0.85, 0.3, -0.80 ) attachElements ( neon, theVehicle or source, -0.85, 0.3, -0.80 ) elseif ( id == 431 ) or ( id == 437 ) then attachElements ( neon3, theVehicle or source, 1.3, -0.7, -0.77 ) attachElements ( neon2, theVehicle or source, -1.3, -0.7, -0.77 ) attachElements ( neon1, theVehicle or source, 1.3, 1.8, -0.77 ) attachElements ( neon, theVehicle or source, -1.3, 1.8, -0.77 ) elseif ( id == 415 ) or ( id == 542 ) or ( id == 466 ) or ( id == 604 ) then attachElements ( neon3, theVehicle or source, 0, 1.1, -0.57, 0, 0, 90 ) attachElements ( neon2, theVehicle or source, 0, -1.15, -0.57, 0, 0, 90 ) attachElements ( neon1, theVehicle or source, 0.9, 0, -0.57 )
  3. المشكلة من الاحداثيات رح لوحة الادمنية وحط نفسك بانترو 3 وانسخ الاحداثيات الي يحطك فيها واستبدلها بالموجودة عندك
  4. يشيخ تكلم عربي زي الناس والله مافهمت شي
  5. قلت لك حط كود الانترو قبل كود وضع الاحداثيات أسف ع الخروج عن الموضوع لاكن وينكك غايب ماشوفك بالجنوب !! عسى م شـر اشغال الدنيا , قريب ان شاء الله نرجع له
  6. 1- تأكد من الاحداثيات 2- تأكد من العالم الوهمي حقك انه 0 3- تاكد من الانترو حقك انه 0 4- تأكد من الميتا <>
  7. المفروض تشوف وش يطلع معك بالدي بوق وتوضح المشكلة بردك لاكن حط كود setElementInterior ( hitPlayer, 3 ) قبل setElementPosition ( hitPlayer,1351.68250 -1756.66064 13.50781 ) تعرف ليش صح
  8. اكبر غلط انك تحط كود وتقول كذا المفروض تجرب وتشوف وش يطلع لك بالديبوق وتحاول تصلحه ماقدرت تحط الكود الي فيه اخطاء
  9. createMarker -- نسوي ماركر "onMarkerHit" -- حدث اول مايدخل الماركر getElementType -- نتحقق من المنت الي دخل الماركر isPedInVehicle -- نتحقق ان الاعب ماهو بسيارة setElementInterior -- نحطه في انترو هذا بالنسبة للدخول وبالنسبة للخروج createMarker -- نسوي ماركر setElementInterior -- نحط الماركر في انترو "onMarkerHit" -- حدث اول مايدخل الماركر getElementType -- نتحقق من المنت الي دخل الماركر isPedInVehicle -- نتحقق ان الاعب ماهو بسيارة setElementInterior -- نرجعه للانترو الاساسي 0
  10. @ Le3bA يعني بالله تسوي كل الاكواد ذي , بس عشان شخصية وحده ؟ ماتجي بالعقل ي راقل
  11. (= لو خليتوه يحاول كان افضل , نعرف انكم فاهمين
  12. شي طبيعي لانك مستخدم حدث "onClientGUIDoubleClick" المفروض "onClientGUIClick"
  13. ماشوفها بكودك checkForWinner سطر 8 وين الوظيفة
  14. اعتقد انه اوبجكت ومثبت عليه البيد وشفافية الاوبجكت 0
  15. مافهمت شي يعني انت تبي تسوي بيد بالدايري ولاكن بنفس طريقة الي بالصورة ؟
  16. run.counter.pcoun ممكن تقولي من وين جبت
  17. ^ العفو + @ ™!>VàLéNTiNô كود بروقيمر شغال وطريقته صحيحة , اما انت في عندك اخطاء وكودك ملخبط , اهم شي افادة صاحب الموضوع وبدون هواش عشان كود
  18. @ ™!>VàLéNTiNô يقدر يستخدم الي قلت له عليه ويستخدم معهم "onPlayerVehicleEnter" getElementModel toggleControl -- vehicle_secondary_fire وانتهينا
  19. @ Default لنفترض ان الاعب مغير بازرار الكبيورد وكل لاعب وله اعداداته في الكيبورد وكذا ماراح تقدر تحدد الزر الي يطلق فيه من الهنتر فـ عشان كذا استخدم "onResourceStart" getElementsByType -- vehicle getElementModel -- ID Hunter getElementsByType -- player toggleControl -- vehicle_fire toggleControl -- vehicle_secondary_fire ^ تقدر تسوي نظام انك تمنعه عن الكل وتخليه لك بس فيه اكثر من طريقة ولاكن اذا تبيه للكل استخدم الي فوق طبعا سهل مره وحاول وانا بساعدك بالتوفيق ان شاء الله
  20. setWorldSpecialPropertyEnabled -- extrajump
  21. شف المسألة يبيلها شوية حسابات شوف المثال وحاول تطبق عليه طلبك function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end scrollbar = guiCreateScrollBar(0.29, 0.44, 0.39, 0.05, true, true) guiSetVisible ( scrollbar , false ) guiSetAlpha ( scrollbar , 0 ) local screenW, screenH = guiGetScreenSize() local x_, y_ = ( screenW / 800 ), ( screenH / 600 ) local x = 0 function Scr() local x__ = x + 269 dxDrawLine(screenW * 0.3337, screenH * 0.4750, screenW * 0.6275, screenH * 0.4750, tocolor(255, 255, 255, 255), 1, true) dxDrawLine(screenW * 0.3337, screenH * 0.4750, screenW * 0.3337, screenH * 0.5067, tocolor(255, 255, 255, 255), 1, true) dxDrawRectangle( x_*x__ , y_*285, x_*17, y_*20, tocolor(0, 0, 0, 255), false) dxDrawLine(screenW * 0.6275, screenH * 0.4750, screenW * 0.6275, screenH * 0.5083, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(screenW * 0.3337, screenH * 0.5083, screenW * 0.6275, screenH * 0.5083, tocolor(255, 255, 255, 255), 1, true) end bindKey ( "f3","down",function ( ) if isEventHandlerAdded ( "onClientRender", root , Scr ) then removeEventHandler ( "onClientRender", root , Scr ) guiSetVisible ( scrollbar , false ) showCursor ( false ) else addEventHandler("onClientRender", root,Scr) guiSetVisible ( scrollbar , true ) showCursor ( true ) end end ) addEventHandler("onClientGUIScroll",getRootElement(), function ( ) if ( source == scrollbar ) then Pos = guiScrollBarGetScrollPosition ( scrollbar ) x = Pos * 2.17 end end )
×
×
  • Create New...