#Doctor Posted April 11, 2020 Share Posted April 11, 2020 شباب انا صممت الماب ديربي بس لازمه برمجه ايش الأكواد لي استعملها عشان لما الواحد يكتب ديربي يطلع في الديربي Link to comment
Scripting Moderators xLive Posted April 11, 2020 Scripting Moderators Share Posted April 11, 2020 الفنكشنات يلي تحتاجها addEventHandler "onPlayerChat" -- حدث اذا ارسل رسالة بالشات عشان تتحقق اذا كتب كلمة 'ديربي' createVehicle -- تسوي له سيارة بمكانه بالديربي warpPedIntoVehicle -- تنقل الاعب للسيارة setElementDimension -- اذا الماب حقك بعالم وهمي ثاني تحتاج تغير العالم الوهمي حق الاعب وحق السيارة Link to comment
^iiEcoo'x_) Posted April 12, 2020 Share Posted April 12, 2020 (edited) تفضل جزء من الكود , الباقي انت كمله _G [ 'Marker' ] , _G [ 'Table' ] , _G [ 'Vehicles' ] , _G [ 'OpemTime' ] , _G [ 'VehicleId' ] , _G [ 'Dimension' ] , _G [ 'MissionState' ] , _G [ 'PlayersInMission' ] , _G [ 'StartTime' ] = , createMarker ( x , y , z , type , size , red , green , blue , alpha ) , { } , { [ 1 ] = { x , y , z , false , rotationX , rotationY , rotationZ } , [ 2 ] = { x , y , z , false , rotationX , rotationY , rotationZ } , [ 3 ] = { x , y , z , false , rotationX , rotationY , rotationZ } , [ 4 ] = { x , y , z , false , rotationX , rotationY , rotationZ } } , 5 -- Start time ( minutes ) , { } , 543 , 1 , 'Closed' , 0 , 2 -- Open time ( m. ) function StartMission ( ) setTimer ( function ( ) for i , v in ipairs ( VehicleSpawn ) do Vehicles [ i ] [ 4 ] = createVehicle ( VehicleId , Vehicles [ i ] [ 1 ] , Vehicles [ i ] [ 2 ] , Vehicles [ i ] [ 3 ] ) setElementRotation ( Vehicles [ i ] [ 4 ] , Vehicles [ i ] [ 5 ] , Vehicles [ i ] [ 6 ] , Vehicles [ i ] [ 7 ] ) setElementFrozen ( Vehicles [ i ] [ 4 ] , true ) setElementDimenstion ( Vehicles [ i ] [ 4 ] , Dimension ) MissionState = 'Open' PlayersInMission = 0 end setTimer ( function ( ) MissionState = 'Closed' for i , v in ipairs ( VehicleSpawn ) do setElementFrozen ( Vehicles [ i ] [ 4 ] , false ) end end , 1000 * 60 * OpenTime , 1 ) end , 1000 * 60 * StartTime , 1 ) end addEventHandler ( 'onMarkerHit' , resourceRoot , function ( Player ) if ( getElementType ( Player ) == 'player' ) and ( not isPedInVehicle ( Player ) ) then if ( MissionState == 'Closed' ) then return end if ( PlayersInMission == #Vehicles ) then return end PlayersInMission = PlayersInMission + 1 Table [ Player ] = { true , PlayersInMission } warpPedIntoVehicle ( Player , Vehicles [ Table [ Player ] [ 2 ] ] [ 4 ] ) end end ) Edited April 12, 2020 by ^iiEcoo'x_) Link to comment
Guest Posted April 12, 2020 Share Posted April 12, 2020 15 hours ago, #Doctor said: شباب انا صممت الماب ديربي بس لازمه برمجه ايش الأكواد لي استعملها عشان لما الواحد يكتب ديربي يطلع في الديربي Link to comment
#Doctor Posted April 12, 2020 Author Share Posted April 12, 2020 14 hours ago, Live said: الفنكشنات يلي تحتاجها addEventHandler "onPlayerChat" -- حدث اذا ارسل رسالة بالشات عشان تتحقق اذا كتب كلمة 'ديربي' createVehicle -- تسوي له سيارة بمكانه بالديربي warpPedIntoVehicle -- تنقل الاعب للسيارة setElementDimension -- اذا الماب حقك بعالم وهمي ثاني تحتاج تغير العالم الوهمي حق الاعب وحق السيارة شكطراا على مساعدتك حبيبي 5 hours ago, ^iiEcoo'x_) said: تفضل جزء من الكود , الباقي انت كمله _G [ 'Marker' ] , _G [ 'Table' ] , _G [ 'Vehicles' ] , _G [ 'OpemTime' ] , _G [ 'VehicleId' ] , _G [ 'Dimension' ] , _G [ 'MissionState' ] , _G [ 'PlayersInMission' ] , _G [ 'StartTime' ] = , createMarker ( x , y , z , type , size , red , green , blue , alpha ) , { } , { [ 1 ] = { x , y , z , false , rotationX , rotationY , rotationZ } , [ 2 ] = { x , y , z , false , rotationX , rotationY , rotationZ } , [ 3 ] = { x , y , z , false , rotationX , rotationY , rotationZ } , [ 4 ] = { x , y , z , false , rotationX , rotationY , rotationZ } } , 5 -- Start time ( minutes ) , { } , 543 , 1 , 'Closed' , 0 , 2 -- Open time ( m. ) function StartMission ( ) setTimer ( function ( ) for i , v in ipairs ( VehicleSpawn ) do Vehicles [ i ] [ 4 ] = createVehicle ( VehicleId , Vehicles [ i ] [ 1 ] , Vehicles [ i ] [ 2 ] , Vehicles [ i ] [ 3 ] ) setElementRotation ( Vehicles [ i ] [ 4 ] , Vehicles [ i ] [ 5 ] , Vehicles [ i ] [ 6 ] , Vehicles [ i ] [ 7 ] ) setElementFrozen ( Vehicles [ i ] [ 4 ] , true ) setElementDimenstion ( Vehicles [ i ] [ 4 ] , Dimension ) MissionState = 'Open' PlayersInMission = 0 end setTimer ( function ( ) MissionState = 'Closed' for i , v in ipairs ( VehicleSpawn ) do setElementFrozen ( Vehicles [ i ] [ 4 ] , false ) end end , 1000 * 60 * OpenTime , 1 ) end , 1000 * 60 * StartTime , 1 ) end addEventHandler ( 'onMarkerHit' , resourceRoot , function ( Player ) if ( getElementType ( Player ) == 'player' ) and ( not isPedInVehicle ( Player ) ) then if ( MissionState == 'Closed' ) then return end if ( PlayersInMission == #Vehicles ) then return end PlayersInMission = PlayersInMission + 1 Table [ Player ] = { true , PlayersInMission } warpPedIntoVehicle ( Player , Vehicles [ Table [ Player ] [ 2 ] ] [ 4 ] ) end end ) شكرا حبيبي ما قصرت Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now