Jump to content

al-Kobra

Members
  • Posts

    740
  • Joined

  • Last visited

Everything posted by al-Kobra

  1. في مود اسمه missiontimer في السيرفر من قبل
  2. هذا مثلا اذا بتسوي متغير او تبي تعرّف شي مثال local x, y, z = getElementPosition ( localPlayer ) createMarker ( x, y, z ) -- شوف هنا الاحداثيات ,, اخذناها من تعريف الاحداثيات الا فوق
  3. بس مكتوب في السينتكس float, float, float getElementPosition ( element theElement ) واحداثيات السيارة ناقصة !
  4. الجدوال https://forum.multitheftauto.com/viewtopic.php?f=164&t=50471 الشرح مية مية ذذ
  5. اول شي لازم تسوي ماركر مخفي مكان البوابة createMarker createObject 'onMarketHit' function ( elm ) getElementType getElementData moveObject
  6. حاول تسوي ,, ولو طلع هريسة حنا بنساعدك
  7. زاحف ,, 'onPlayerVehicleEnter' هذا الحدث ما يصير تسويله كنسل ايفنت #Edit جرب تسوي اذا اخذ سيارة من الجريد لست يسوي لها داتا ,, وبعدين اذا بيركب السيارة يتحقق من الداتا =)
  8. جرب كذا ,, طريقة مختصرة bindKey("F3", "down", function ( ) guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end )
  9. جرب السيرفر كذا local vehicle = { }; addEvent( "GiveCar", true ) addEventHandler( "GiveCar", root, function ( name ) if ( isElement( vehicle[ source ] ) ) then destroyElement( vehicle[ source ] ) end local x, y, z = getElementPosition ( source ) vehicle[ source ] = createVehicle ( getVehicleModelFromName( name ), x, y, z ) warpPedIntoVehicle ( source, vehicle[ source ] ) end ) ------------- addEventHandler ( "onVehicleStartEnter", root, function( plr ) if getPlayerTeam( plr ) and getPlayerTeam( plr ) ~= getTeamFromName( "No Team" ) then cancelEvent( ) end end ) ------------------ addEventHandler("onVehicleExplode",root,function() setTimer(destroyElement,3000,1,source) end) ------- addEventHandler( "onPlayerQuit", root, function( ) if ( isElement( vehicle[ source ] ) ) then destroyElement( vehicle[ source ] ) vehicle[ source ] = nil end end )
  10. اكيد شرح رائع ما دام انت الا مسويه خخخ برب بشوف الشرح
  11. اجل ليه تبي كود ؟
  12. https://community.multitheftauto.com/in ... ls&id=7098
  13. bindKey ( "key", "down", function ( ) showChat ( not isChatVisible ( ) ) end ) Client Side
  14. قروب ف الاسل او في مود احمد فيف ؟
  15. ارفع الصورة على مركز الخليج
  16. انت تحطهم من عندك ,, مثلا local col = createColRectangle ( 216, -1350, 10, 10 ) -- الحين راح يصير مربع local col = createColRectangle ( 216, -1350, 10, 5 ) -- الحين راح يصير مستطيل واذا تبغيه يظهر ,, V
  17. x = احداثية ,, تقدر تجيبها من لوحة الادمنية او الفري روم y = زي الكلام الا فوق width = العرض height = الطول ملاحظة ,, الاكس و الواي لازم تجيبهم من منتصف المكان الا تبي تسوي فيه حماية
  18. local col = createColRectangle ( x, y, width, height ) addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), function () isElementWithinColShape ( source, col ) cancelEvent () end )
  19. Client Side : local car = { {"Banshee"}; --{"Car Name"}; } GUIEditor = { gridlist = {}, window = {} } GUIEditor.window[1] = guiCreateWindow(258, 194, 405, 339, "", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.gridlist[1] = guiCreateGridList(9, 22, 204, 307, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "السيارة", 0.5) function onStart() for i, v in ipairs (car) do row = guiGridListAddRow ( GUIEditor.gridlist[1] ) guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, v[1], false, false ) end end addEventHandler("onClientResourceStart", resourceRoot, onStart ) addEventHandler("onClientGUIDoubleClick", GUIEditor.gridlist[1], function () local Roww, column = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) if Roww and column and Roww ~= -1 and column ~= -1 then local carid = guiGridListSetItemText ( GUIEditor.gridlist[1], Roww, column ) local carsID = getVehicleModelFromName ( carid ) triggerServerEvent( "buyCar", localPlayer, carsID ) end end ) bindKey("F3","down", function() guiSetVisible ( GUIEditor.window[1], not guiGetVisible (GUIEditor.window[1]) ) showCursor ( guiGetVisible (GUIEditor.window[1]) ) end ) Server Side : local car = {} addEvent("buyCar",true) addEventHandler("buyCar",root, function (id) if isElement(car[source]) then destroyElement(car[source]) end local x, y, z = getElementPosition ( source ) car[source] = createVehicle ( id, x + 10, y, z ) end ) addEventHandler("onVehicleExplode",root,function() setTimer(destroyElement,2000,1,source) end) addEventHandler ( "onPlayerQuit", root, function ( ) if car[source] then if isElement ( car[source] ) then destroyElement(car[source]) end car[source] = nil end end )
×
×
  • Create New...