Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/09/23 in all areas

  1. وظيفة triggerLatentClientEvent الكثير منا يتجاهلها ويستخدم triggerClientEvent والفرق اللي بينهم ان triggerClientEvent اسرع في النقل لانها بتحمل الداتا كلها مرة واحدة ولكن triggerLatentClientEvent تاخد وقت ااكثر بقليل جدا من التريقر العادي للنقل 15% CPU ولكن لما تستخدم التريقر العادي هيسحب من ال CPU ولكن بالتريقر ليتينت ما راح يسحب شئ من ال لذالك انصح باستخدام triggerLatentClientEvent بالتوفيق
    3 points
  2. Hey, for last 2 months (or so) I was working on resource for MTA that implements custom rendering, idea was simple - get huge graphics improvment while saving original SA feeling, and I think I managed to do that! (Greetings to people who have been saying for years that MTA is too limited for shaders like that lol) It's important to mention - it's not ENB or any external script - it's just a resource, that server owner can start for everyone and players don't need to download anything! I'm here to share with you progress of it, yes - it's not done yet, but I'm very close to finishing it. Gallery (with slider to compare): https://borsuczyna.github.io Screenshots: What are requirements? Any gpu with shader model 3.0 can run it (almost any) special thanks Ren712, Einheit-101 Most important - when release? Sadly, I can't tell. There are still many things to do and to make it playable shader, like weather effects, finishing timecyc etc. also important to mention is that project will be open source when finished, anyone can contribute to it or create own fork! If you're interested in development, want to contribute or just want to look at some good pics everyday, join my discord server: https://discord.gg/gY5BZs4Y5Z (ps. please unban me from mta discord)
    2 points
  3. خطأ علي هيئة متغير المفروض تكتبة علي هيئة سلسلة نصية او تعرف المتغير rec انتا كاتب كلمة ولصاحب الموضوع استعمل التريقر في السيرفر وارسلوا للكلنت من خلال الدالة triggerClientEvent servermessages للحدث اللي اسموا
    2 points
  4. https://wiki.multitheftauto.com/wiki/Garage
    2 points
  5. السلام عليكم ورحمه الله وبركاتة امس في القسم الاجنبي عضو سال ازاي يجيب اقرب بيد بالنسبة لنقطة عطيتو الفنكشن بس حبيت اطوروا اكثر getNearsetElmFromXYZ الفنكشن عبارة عن يجيبلك اقرب اليمنت بالنسبة لنقطة معينة ( الساينتكس / syntax ) : function getNearsetElmFromXYZ( etype , x , y , z ) etype : نوع الاليمنت x , y , z : احداثيات النقطة ( السورس كود / Source Code ) : function getNearsetElmFromXYZ( etype , x , y , z ) local elements , positions , element = getElementsByType( etype ) , { } , { } if( ( not elements ) or ( #elements == 0 ) ) then return false end for index = 1 , #elements do positions[ index ] = getDistanceBetweenPoints3D( x , y , z , getElementPosition( elements[ index ] ) ); element[ positions[ index ] ] = elements[ index ]; end return element[ math.min( unpack( positions ) ) ]; end ودا مثال يجيب معلومات اقرب سيارة بالنسبة لمكان الاعب addCommandHandler( "getNearsetVeh" , function( plr ) local nearstVehicle = getNearsetElmFromXYZ( "vehicle" , getElementPosition( plr ) ); if( not nearstVehicle ) then return outputChatBox( "There\'s not vehicles" ); end outputChatBox( "Name : " .. getVehicleName( nearstVehicle ) ); outputChatBox( "Model : " .. getElementModel( nearstVehicle ) ); end ) @Master_MTA --> معلش علي اللون الاخضر ما اقدر اقاوم لوول
    2 points
  6. Normally this combination should be working. But there is one thing that is incorrect, and that is where the event is triggered. Currently it should trigger for all players, but multiplied by the amount of players. Since there is no player target set to where the event is sending to. triggerClientEvent("raceCevent", thePlayer) My recommendations: Serverside triggerClientEvent( thePlayer, -- send to this player "raceCevent", resourceRoot -- source is resourceRoot ) Clientside addEvent("raceCevent", true) addEventHandler("raceCevent", resourceRoot, -- activate the event based on the source resourceRoot function () end, false) -- disable propagate for security reasons
    1 point
  7. العفو يا قمر يب تاثر لان التحقق يبيلوا دقة مثل انتا تبي تجيب لاعب من اسموا لازم يكون الاسم بالظبط ____________________________________________________________ واستنادا لكلام الاخ ماستر يعطية العافية تم تصليح الاخطاء function setPedShootOn( ped , element ) if( not renderTimer ) then renderTimer = { }; end local available_types = { [ 'vehicle' ] = true , [ 'ped' ] = true , [ 'player' ] = true , }; if( ( isElement( ped ) and getElementType( ped ) == "ped" ) and ( isElement( element ) and available_types[ getElementType( element ) ] ) ) then if( renderTimer[ ped ] and isTimer( renderTimer[ ped ] ) ) then killTimer( renderTimer[ ped ] ); renderTimer[ ped ] = nil; end renderTimer[ ped ] = setTimer( function( myPed ) local px , py , pz = getElementPosition( myPed ); local posX , posY , posZ = getElementPosition( element ); local rotZ = -math.deg( math.atan2( posX - px , posY - py ) ); if( rotZ < 0 ) then rotZ = rotZ + 360; end setElementRotation( myPed , 0 , 0 , rotZ , "default" , true ); setPedAimTarget( myPed , posX , posY , posZ ); setPedControlState( myPed , "fire" , not getPedControlState( ped , "fire" ) ); end , 50 , 0 , ped ); end return false end
    1 point
  8. السلام عليكم ورحمه الله وبركاتة جا في بالي اسوي وظيفة setPedShootOn عبارة عن يخلي البيد يصوب ويضرب علي المنت معين Client Side الوظيفة Source Code : function setPedShootOn( ped , element ) local available_types = { [ 'vehicle' ] = true , [ 'ped' ] = true , [ 'player' ] = true , }; if( isTimer( renderTimer ) ) then killTimer( renderTimer ); end if( isElement( element ) and available_types[ getElementType( element ) ] ) then renderTimer = setTimer( function( ) local px , py , pz = getElementPosition( ped ); local posX , posY , posZ = getElementPosition( element ); local rotZ = -math.deg( math.atan2( posX - px , posY - py ) ); if( rotZ < 0 ) then rotZ = rotZ + 360; end setElementRotation( ped , 0 , 0 , rotZ , "default" , true ); setPedAimTarget( ped , posX , posY , posZ ); setPedControlState( ped , "fire" , not getPedControlState( ped , "fire" ) ); end , 50 , 0 ); end return false end : مثال local myPed = createPed( 0 , getElementPosition( localPlayer ) ); setPedShootOn( myPed , localPlayer ); givePedWeapon( myPed , 31 , 5000 , true ); -- طبعا متنساش تحط السورس كود الاول :) --
    1 point
×
×
  • Create New...