Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/05/17 in all areas

  1. السلامـ عليكمـ ورحمة الله وبركاته , جيو إدتور الآن على الإنترنت ( اون لاين ) بنفس المميزات , لكنه لا يدعم الدي إكس ! * الصفحة يوجد بها أخطاء , الموضوع مطروح في القسم الخاص ب الجيو ادتور , لكن قمت بنقله لهنا للإستفادة x[ صفحة الجيو ادتور اونلاين ]x x[ صفحة الموضوع الأصلي لـ الجيو ادتور اونلاين ]x =================================================================================================== كيف نقوم بإستخدام الصفحة والدخول للجيو ادتور ؟ فور دخولك لـ صفحة الجيو ادتور اونلاين سيظهر لكـ ما في هذهـ الصورة ثم تضغط على الزر المحدد عليه بـ اللون الأحمر ! وبعدها ستضهر لك هذهـ النافذة ! بعد أن ظهرت لك النافذة , قم بالضغط على وسط النافذة وقم بعدها بصنع لوحاتك ! , كيف تعرف أين اللذي صنعته ؟ " OutPut " قم بالضغط بالزر الأيمن للفأرة , وستضهر لك هذه الخانات , ثم إضغط على زر ستظهر لك هذه النافذة مبينة لك اكواد اللوحة اللتي قمت بصنعها أتمنى الموضوع عجبكم , والسلام عليكم ورحمة الله وبركاته
    4 points
  2. I made a 3D GUI System in MTA:SA. You can place 3D GUI Elements (Buttons, Textboxes, Labels, Lists, Checkboxes, Sliders, etc.) wherever you want. It's not public yet.
    2 points
  3. I must say I +1 this, on SA-MP there are a :~ ton of popular trucking servers and I personally believe there would be on MTA:SA (which would possibly transfer even more people from SA-MP to MTA:SA) as well with even better features but the main issue is that a trucking server would not really work on MTA:SA that well mainly cause of the terrible trailer sync.
    2 points
  4. New city Project status: 20%
    1 point
  5. تأكد انه مافي تكسد مركب على الايدي من قبل : )
    1 point
  6. يعطيك الف عافيه اتبعت الخطوات الي وضعتها الموتر شغال وظهر لك بالسيرفر المحلي حاولت كثير اشغله بسيرفري الاونلاين للاسف مااشتغل اتوقع فيه مشكلة بالسيرفر مشكور على جهودك معي وتعبتك يعطيك الف الف عافيه
    1 point
  7. بما ان الاكواد مافيها اخطاء , فالمشكلة غير متعلقه بالاكواد تأكد من : اسم التي اكس دي و الدي اف اف انهم موجودين بالميتا صحة الملفات ( اي بمعني ان الملفات لايوجد بها مشاكل ) الايدي الخاص بالمركبة تأكد من انه صحيح
    1 point
  8. He came here asking if he can trigger to multiple players without loop, you said no, I said yes, he can. That's my perspective, but you're right, it's just a performance question, if looping through a table of players and triggering in LUA is the same as looping through the table in MTA's environment would be the same, they wouldn't have implemented the option to trigger with a table in the first place, in my honest opinion, but anyway, I think his problem has been solved.
    1 point
  9. ID = 466 addEventHandler ( "onClientResourceStart", resourceRoot, function( ) downloadFile("2.txd") downloadFile("2.dff") end ) function onDownloadFinish ( file, success ) if ( source == resourceRoot ) then outputChatBox ( tostring(success) ) if ( success ) then if ( file == "2.dff" ) then local dff = engineLoadDFF ( "2.dff" ) engineReplaceModel ( dff, ID ) end if ( file == "2.txd" ) then local txd = engineLoadTXD ( "2.txd" ) engineImportTXD ( txd, ID ) end end end end addEventHandler ( "onClientFileDownloadComplete", getRootElement(), onDownloadFinish )
    1 point
  10. 1 point
  11. معليش ما فهمت عليك قصدك لما تحذف اللعبه بيرجع يحمل الملفات من اول ولا وشو صراحه ما فهمت+_+ تقدر تووضحلي اكثر وبالمناسبة كودك خاطئ الصحيح ID = 466 addEventHandler ( "onClientResourceStart", resourceRoot, function( ) downloadFile("2.txd") downloadFile("2.dff") end ) function onDownloadFinish ( file, success ) if ( source == resourceRoot ) then outputChatBox ( string(success) ) if ( success ) then if ( file == "2.dff" ) then replaceTheDff ( "2.dff",ID ) else if ( file == "2.txd" ) then replaceTheTxd ( "2.txd",ID ) end end end end end addEventHandler ( "onClientFileDownloadComplete", getRootElement(), onDownloadFinish ) او تقدر تختصر طريقتي ب elseif
    1 point
  12. Well, that will only run once, you will need to call it inside a setTimer or attach it to an event, eg. when the round ends etc, but yes, whenever it triggers, it will update the table automatically.
    1 point
  13. نورت يل عسل اكيد ما استحي كلكم اخواني حبايب قلبي عارفكم ما تقصرون بالنسبه لموداتي ما سويت الا 3 المنشورين الباقي ابرمج مقابل مبلغ مادي او خدمه على العموم مشكور يالطيب على المرور باذن الله نشوفك تزورنا لو تبي تخش الحين تشوف وش سوينا ابشر بس تو وصلنا 14%او 13% يعني ما بتحصل شغل واجد على العموم ابشرك باذن الله كل اللي موجود اصدارات اوليه يعني الجيو وذا كله اولي على العموم اذا بغيت تزورنا حياك اختصار السيرفر B.L لو بغيت الباس ابشر تواصل معي بالخاص بالنسبة للاعضاء حنا فقط 3 اعضاء -متخصص برمجة مواقع -2 برمجه ناقصنا الاتي 1-مصمم مابات 2-مصمم تكسد بيكون 3 اعضاء بالتيم ما بيحتاج ذا كله +_+ على العموم نصيحتك على راسي باقي قلبي 13% تقريبا بدينا لكن الاختبارات بتضغطنا لذلك ما بيكون في نشاط لمدة 2 اسبوع تقريبا +_+
    1 point
  14. Actually interpolateBetween has 2 recursive easing types, "SineCurve" and "CosineCurve", no need for a loop or timers.
    1 point
  15. local result, num_rows_affected = dbPoll(dbQuery(userdata_db,"SELECT * FROM masterdata WHERE username = ?",username),-1) if num_rows_affected ~= 0 then outputChatBox("#afafaf[#f9a52fSA:MP#afafaf] #f9a52fVeritabanina bir veri eklenmedi.",root,255,255,255,true) else dbExec(userdata_db,"INSERT INTO masterdata VALUES (?,?,?,?,?)",username,serial,ip,'',oyuncu) end
    1 point
  16. Can you post your creating table code? If you want to view 'result' table, you can use this: outputConsole(toJSON(result))
    1 point
  17. بتوفيق لك انت وجنتول
    1 point
  18. @#!~Aln3mani~#! المهمة المدة المبلغ طرق الدفع
    1 point
  19. Alright, I managed to figure it out for you. I also included the OOP version. So, I found out attachElements doesn't have the custom order parameter which allows you to set the order of the rotation. The expected rotation order would be ZYX, in OOP this is not the case however. I am not entirely sure why this is, it might be because of some simple rule but I just don't realize it right now... maybe it's written somewhere in the depths of the Wiki, but I cba to find it right now. I changed some of the parameters for the addVehicleCustomWheel function to allow tilt and scale upon call. I also added a command /customwheels so you can try it out by typing /customwheels [tilt] [scale] Anyway, have fun, either one works, whichever you like the best. I also cleaned up and commented the code just because people might be interested in this, so it's better if this is cleaned up for future reference. For you specifically, the fix would be to look into the calculateVehicleWheelRotation function, which shows how I've attached the custom wheel to the vehicle. Those contents should replace your attachElements, because attachElements doesn't work, you have to attach manually with position and rotation... Client-side -- Table containing vehicles that have custom wheels local createdCustomWheels = { } --[[ /customwheels [ number tilt, number scale ] Adds custom wheels to your currently occupied vehicle and optionally applies a tilt angle and wheel scale. ]] addCommandHandler( 'customwheels', function( _, tilt, scale ) -- Let's get our vehicle local vehicle = getPedOccupiedVehicle( localPlayer ) -- Oh, we have a vehicle! if ( vehicle ) then -- Let's give it a wheel now addVehicleCustomWheel( vehicle, 1075, tilt, scale ) end end ) -- Let's bind that command to F2 as requested by OP bindKey( 'f2', 'down', 'customwheels' ) --[[ void addVehicleCustomWheel ( vehicle vehicle, number model [ , number tilt, number scale ] ) Adds custom wheels to the vehicle. ]] function addVehicleCustomWheel( vehicle, model, tilt, scale ) -- If we've given the object's model number if ( tonumber( model ) ) then -- Let's delete any old ones for _, wheel in pairs( createdCustomWheels[ vehicle ] or { } ) do destroyElement( wheel.object ) end -- And let's nil it to be clear createdCustomWheels[ vehicle ] = nil -- Let's set some component names we want to customize local wheels = { 'wheel_lf_dummy', 'wheel_rf_dummy' } -- Let's iterate through those components for i = 1, #wheels do -- Let's hide the existing component setVehicleComponentVisible( vehicle, wheels[ i ], false ) -- Initialize our wheel table local wheel = { tilt = tonumber( tilt ) or 0, -- We'll default a non-number tilt angle to 0 name = wheels[ i ], -- Let's store the component name object = createObject( model, Vector3( ) ) -- Let's make a new wheel object } -- Let's set the vehicle as the wheel object's parent setElementParent( wheel.object, vehicle ) -- Let's make sure the wheel is not colliding with the vehicle setElementCollidableWith( wheel.object, vehicle, false ) -- Let's change the scale setObjectScale( wheel.object, tonumber( scale ) or 0.7 ) -- Let's update that original table wheels[ i ] = wheel end -- And let's store all of those wheels now createdCustomWheels[ vehicle ] = wheels end end --[[ void calculateVehicleWheelRotation ( vehicle vehicle, table wheel ) Let's calculate the wheel rotation for given wheel(s). ]] function calculateVehicleWheelRotation( vehicle, wheel ) -- If we have many wheels in the given argument if ( type( wheel ) == 'table' ) and ( #wheel > 0 ) then -- Let's iterate through them all for i = 1, #wheel do -- Let's call the method alone with just the iterator calculateVehicleWheelRotation( vehicle, wheel[ i ] ) end -- Let's stop here now return end -- If we have an object if ( wheel.object ) then -- Let's get the rotation vector of the original component local rotation = Vector3( getVehicleComponentRotation( vehicle, wheel.name, 'world' ) ) -- Let's set our tilt angle rotation.y = wheel.tilt -- Let's make sure the wheel is at the original component's position setElementPosition( wheel.object, Vector3( getVehicleComponentPosition( vehicle, wheel.name, 'world' ) ) ) -- Let's finally set the rotation (in ZYX order, important!) setElementRotation( wheel.object, rotation, "ZYX" ) end end -- Render-time! addEventHandler( 'onClientPreRender', root, function( ) -- Let's iterate through all the vehicles for vehicle, wheels in pairs( createdCustomWheels ) do -- If we have a vehicle, it's streamed in and it has wheels if ( vehicle ) and ( isElementStreamedIn( vehicle ) ) and ( #wheels > 0 ) then -- Let's calculate wheel rotation! calculateVehicleWheelRotation( vehicle, wheels ) end end end ) Client-side (OOP) -- Table containing vehicles that have custom wheels local createdCustomWheels = { } --[[ /customwheels [ number tilt, number scale ] Adds custom wheels to your currently occupied vehicle and optionally applies a tilt angle and wheel scale. ]] addCommandHandler( 'customwheels', function( _, tilt, scale ) -- Let's get our vehicle local vehicle = localPlayer:getOccupiedVehicle( ) -- Oh, we have a vehicle! if ( vehicle ) then -- Let's give it a wheel now vehicle:addCustomWheel( 1075, tilt, scale ) end end ) -- Let's bind that command to F2 as requested by OP bindKey( 'f2', 'down', 'customwheels' ) --[[ void Vehicle:addCustomWheel ( number model [ , number tilt, number scale ] ) Adds custom wheels to the vehicle. ]] function Vehicle:addCustomWheel( model, tilt, scale ) -- If we've given the object's model number if ( tonumber( model ) ) then -- Let's delete any old ones for _, wheel in pairs( createdCustomWheels[ self ] or { } ) do wheel.object:destroy( ) end -- And let's nil it to be clear createdCustomWheels[ self ] = nil -- Let's set some component names we want to customize local wheels = { 'wheel_lf_dummy', 'wheel_rf_dummy' } -- Let's iterate through those components for i = 1, #wheels do -- Let's hide the existing component self:setComponentVisible( wheels[ i ], false ) -- Initialize our wheel table local wheel = { tilt = tonumber( tilt ) or 0, -- We'll default a non-number tilt angle to 0 name = wheels[ i ], -- Let's store the component name object = Object( model, Vector3( ) ) -- Let's make a new wheel object } -- Let's set the vehicle as the wheel object's parent wheel.object:setParent( self ) -- Let's make sure the wheel is not colliding with the vehicle wheel.object:setCollidableWith( self, false ) -- Let's change the scale wheel.object:setScale( tonumber( scale ) or 0.7 ) -- Let's update that original table wheels[ i ] = wheel end -- And let's store all of those wheels now createdCustomWheels[ self ] = wheels end end --[[ void Vehicle:calculateWheelRotation ( table wheel ) Let's calculate the wheel rotation for given wheel(s). ]] function Vehicle:calculateWheelRotation( wheel ) -- If we have many wheels in the given argument if ( type( wheel ) == 'table' ) and ( #wheel > 0 ) then -- Let's iterate through them all for i = 1, #wheel do -- Let's call the method alone with just the iterator self:calculateWheelRotation( wheel[ i ] ) end -- Let's stop here now return end -- If we have an object if ( wheel.object ) then -- Let's get the rotation vector of the original component local rotation = Vector3( self:getComponentRotation( wheel.name, 'world' ) ) -- Let's set our tilt angle rotation.y = wheel.tilt -- Let's make sure the wheel is at the original component's position wheel.object:setPosition( self:getComponentPosition( wheel.name, 'world' ) ) -- Let's finally set the rotation wheel.object:setRotation( rotation ) end end -- Render-time! addEventHandler( 'onClientPreRender', root, function( ) -- Let's iterate through all the vehicles for vehicle, wheels in pairs( createdCustomWheels ) do -- If we have a vehicle, it's streamed in and it has wheels if ( vehicle ) and ( vehicle:isStreamedIn( ) ) and ( #wheels > 0 ) then -- Let's calculate wheel rotation! vehicle:calculateWheelRotation( wheels ) end end end )
    1 point
×
×
  • Create New...