i,xAhmed Posted July 15, 2014 Share Posted July 15, 2014 آلسلآم عليكم آبي كودد مآحد يقدر يقتل برا البداية + آبي شرح له وطريق تركيب الاحدايثات Link to comment
al-Kobra Posted July 15, 2014 Share Posted July 15, 2014 createColRectangle 'onClientPlayerDamage' if not isElementWithinColShape (.....) then cancelEvent ( ) Link to comment
i,xAhmed Posted July 15, 2014 Author Share Posted July 15, 2014 function coleship ( playerSource, x, y ) if ( x and y ) then createColRectangle ( x, y, 10.0, 10.0 ) addEventHandler ( "onClientPlayerDamage", coleship, ) if not isElementWithinColShape (Collision shape) then cancelEvent () end صح ولا ؟ Link to comment
Max+ Posted July 15, 2014 Share Posted July 15, 2014 function coleship ( playerSource, x, y ) if ( x and y ) then createColRectangle ( x, y, 10.0, 10.0 ) addEventHandler ( "onClientPlayerDamage", coleship, ) if not isElementWithinColShape (Collision shape) then cancelEvent () end صح ولا ؟ 100% وين صح ؟ خش كل كود وشوف كيف مسوى بالويكي ,. . واقرا كل كود وش وظيفته . . Link to comment
i,xAhmed Posted July 15, 2014 Author Share Posted July 15, 2014 function coleship ( playerSource, x, y ) if ( x and y ) then createColRectangle ( x, y, 10.0, 10.0 ) addEventHandler ( "onClientPlayerDamage", coleship, ) if not isElementWithinColShape (Collision shape) then cancelEvent () end صح ولا ؟ 100% وين صح ؟ خش كل كود وشوف كيف مسوى بالويكي ,. . واقرا كل كود وش وظيفته . . وانا وش اسوي ؟ اشوف الاكواد واحاول اقراها بس نصها من الويكي صعبة ياخي كيف ذي اشرحولنا وش نسوي وش نضبط وش نعجل Link to comment
Max+ Posted July 15, 2014 Share Posted July 15, 2014 - --- جرب ذا اذا ماضبط بسوي لك طريقة ثانية ----ServerSide local greenzone = createColRectangle ( 1844.5594482422, 1375.3376464844, 284, 312.22 ) local greenzonemaparea = createRadarArea (1844.5594482422, 1375.3376464844, 284, 312.22, 0, 255, 0, 120) addEventHandler( "onColShapeHit", greenzone, function ( player ) if ( getElementType ( player ) == "player" ) then if isElementWithinColShape ( player, greenzone ) then setElementData ( player, 'Max', true ) triggerClientEvent ( player, 'onClientPlayerDamage', player ) outputChatBox ( ' * Warning You , Cant Kill other Players Here * ',player, 255, 0 , 0 ) end end end ) addEventHandler( "onColShapeLeave", greenzone, function ( player ) if ( getElementType ( player ) == "player" ) then removeElementData ( player, 'Max' ) end end ) ------------------------------------- ---ClientSide addEventHandler( "onClientPlayerDamage", root, function ( player ) if getElementData( player , "Max" == true ) then cancelEvent ( ) end end ) غير الاحداثيات لاحداثيات المنطقة اللي عندك , Link to comment
#DRAGON!FIRE Posted July 15, 2014 Share Posted July 15, 2014 - --- جرب ذا اذا ماضبط بسوي لك طريقة ثانية ----ServerSide local greenzone = createColRectangle ( 1844.5594482422, 1375.3376464844, 284, 312.22 ) local greenzonemaparea = createRadarArea (1844.5594482422, 1375.3376464844, 284, 312.22, 0, 255, 0, 120) addEventHandler( "onColShapeHit", greenzone, function ( player ) if ( getElementType ( player ) == "player" ) then if isElementWithinColShape ( player, greenzone ) then setElementData ( player, 'Max', true ) triggerClientEvent ( player, 'onClientPlayerDamage', player ) outputChatBox ( ' * Warning You , Cant Kill other Players Here * ',player, 255, 0 , 0 ) end end end ) addEventHandler( "onColShapeLeave", greenzone, function ( player ) if ( getElementType ( player ) == "player" ) then removeElementData ( player, 'Max' ) end end ) ------------------------------------- ---ClientSide addEventHandler( "onClientPlayerDamage", root, function ( player ) if getElementData( player , "Max" == true ) then cancelEvent ( ) end end ) غير الاحداثيات لاحداثيات المنطقة اللي عندك , ليه مسوي كل ذا .. ومداك تسويه ماركر بجانب كلنت وكول شيب بجانب كلنت وعندكـ اخطاء ومنها .. : isElementWithinColShape مسوي يوم يخش كول شيب ومتحقق انه بالكول شيب لـ تريقر باسم الحدث ما يصير triggerClientEvent بعدين مسوي Link to comment
Max+ Posted July 15, 2014 Share Posted July 15, 2014 - --- جرب ذا اذا ماضبط بسوي لك طريقة ثانية ----ServerSide local greenzone = createColRectangle ( 1844.5594482422, 1375.3376464844, 284, 312.22 ) local greenzonemaparea = createRadarArea (1844.5594482422, 1375.3376464844, 284, 312.22, 0, 255, 0, 120) addEventHandler( "onColShapeHit", greenzone, function ( player ) if ( getElementType ( player ) == "player" ) then if isElementWithinColShape ( player, greenzone ) then setElementData ( player, 'Max', true ) triggerClientEvent ( player, 'onClientPlayerDamage', player ) outputChatBox ( ' * Warning You , Cant Kill other Players Here * ',player, 255, 0 , 0 ) end end end ) addEventHandler( "onColShapeLeave", greenzone, function ( player ) if ( getElementType ( player ) == "player" ) then removeElementData ( player, 'Max' ) end end ) ------------------------------------- ---ClientSide addEventHandler( "onClientPlayerDamage", root, function ( player ) if getElementData( player , "Max" == true ) then cancelEvent ( ) end end ) غير الاحداثيات لاحداثيات المنطقة اللي عندك , ليه مسوي كل ذا .. ومداك تسويه ماركر بجانب كلنت وكول شيب بجانب كلنت وعندكـ اخطاء ومنها .. : isElementWithinColShape مسوي يوم يخش كول شيب ومتحقق انه بالكول شيب لـ تريقر باسم الحدث ما يصير triggerClientEvent بعدين مسوي اي والله صح بالنسبة للتحقق معك حق , لاني تحققت . , اما بالنسبة للتريقر , شفت اكثر من موضوع مسوي التريقر كذا واتوقع يضبط . . لاني ماسويت addEvent ... Link to comment
#DRAGON!FIRE Posted July 15, 2014 Share Posted July 15, 2014 لا ما ينفع .. لانه ذا تريقر واصلن ليه مسوي تريقر؟ ؟ مدام مسوي داتا خلاص شيل التريقر وسوي الحدث بكلنت وتحقق من الداتا وخلاص Link to comment
Max+ Posted July 15, 2014 Share Posted July 15, 2014 لا ما ينفع .. لانه ذا تريقر واصلن ليه مسوي تريقر؟ ؟ مدام مسوي داتا خلاص شيل التريقر وسوي الحدث بكلنت وتحقق من الداتا وخلاص بالضبط , فيه اكثر من طريقة عشان تسوي ذا , , + انا خلصت له نص من السكربت نبي الرجال يحاول يكمل الباقي ويصحح الاخطاْء . . Link to comment
#DRAGON!FIRE Posted July 15, 2014 Share Posted July 15, 2014 المفروض يوم تحط له كود تحطه صحيح .. + الكود ما يحتاج يكون سيرفر وكلنت وتريقر ومدري ايش سويه كله بجانب كلنت وانتهينا وبحدث واحد وانتيهنا . Link to comment
Max+ Posted July 15, 2014 Share Posted July 15, 2014 المفروض يوم تحط له كود تحطه صحيح ..+ الكود ما يحتاج يكون سيرفر وكلنت وتريقر ومدري ايش سويه كله بجانب كلنت وانتهينا وبحدث واحد وانتيهنا . صدقني يازاحف نظام " جاهز ماينفع معه " انا كنت اول زيه .. ماعرف شي نسخ ولصق . .وعلى الله وعلى فكرة كان معي لغة انجليزية مستوى عالي بس ماكان لي خلق في البرمجة شفتها صعبه وكذا والحين مستواي مره احسن من اول وعندي مواضيع اول لي شفتها غبيه هههههههههههههههههههه خليه يحاول ونشوف لعله يضبطه من نفسه Link to comment
#DRAGON!FIRE Posted July 15, 2014 Share Posted July 15, 2014 انت بـ الشكل ذا تعقد عليه .. الكود بسيط وما يبي له كل ذا واشرح له الكود وبيفهم .. : local colshape = createColRectangle ( x, y, w, h ) ---- صنع كول شيب addEventHandler( "onClientPlayerDamage", localPlayer, function ( ) ---- اضافة حدث تضرر اللاعب if ( isElementWithinColShape ( source, colshape ) ) then ---- تحقق لو اللاعب اللي تضرر كان بالكول شيب cancelEvent ( ) ---- كنسلة الافنت يعني ما يصير تضرر ع اللاعب end --- اغلأق if end ) --- اغلأق الفنكشن .. والقوس حق الحدث هذا هو الكود كله .. ليه مسوي كل ذا مدري Link to comment
Simba Posted July 15, 2014 Share Posted July 15, 2014 انت بـ الشكل ذا تعقد عليه .. الكود بسيط وما يبي له كل ذا واشرح له الكود وبيفهم .. : local colshape = createColRectangle ( x, y, w, h ) ---- صنع كول شيب addEventHandler( "onClientPlayerDamage", localPlayer, function ( ) ---- اضافة حدث تضرر اللاعب if ( isElementWithinColShape ( source, colshape ) ) then ---- تحقق لو اللاعب اللي تضرر كان بالكول شيب cancelEvent ( ) ---- كنسلة الافنت يعني ما يصير تضرر ع اللاعب end --- اغلأق if end ) --- اغلأق الفنكشن .. والقوس حق الحدث هذا هو الكود كله .. ليه مسوي كل ذا مدري +1 الاكواد الطويله المبتدئ بالبرمجة يتعقد منها لانه ما دام انك تقدر تختصر الاكواد فاختصرها عشان يفهمها المبتدئ مثلي يعني Link to comment
al-Kobra Posted July 15, 2014 Share Posted July 15, 2014 هو يبي ماحد يقتل برا البداية ^ Link to comment
#DRAGON!FIRE Posted July 15, 2014 Share Posted July 15, 2014 يمكن يقصد بالبداية ما احد يقتل بس لو يبي برا البداية ما احد يقتل يستبدل التحقق الى .. : if not ( isElementWithinColShape ( source, colshape ) ) then Link to comment
SaRy,#DanGer Posted July 15, 2014 Share Posted July 15, 2014 greenzone وخلاص ! وضبط الاحداثيات , Link to comment
nxFairlywell Posted July 15, 2014 Share Posted July 15, 2014 يققول برا البدايه مايقتل يقتل يعني داخل البدايه بس يقتلون اول مره اسمع فيها ض1 + اعتقد تبي احداثيات واجد Link to comment
jafar Posted July 15, 2014 Share Posted July 15, 2014 يققول برا البدايه مايقتل يقتليعني داخل البدايه بس يقتلون اول مره اسمع فيها ض1 + اعتقد تبي احداثيات واجد يمكن يقصد بالبداية ما احد يقتلبس لو يبي برا البداية ما احد يقتل يستبدل التحقق الى .. : if not ( isElementWithinColShape ( source, colshape ) ) then Link to comment
SaRy,#DanGer Posted July 15, 2014 Share Posted July 15, 2014 يققول برا البدايه مايقتل يقتليعني داخل البدايه بس يقتلون اول مره اسمع فيها ض1 + اعتقد تبي احداثيات واجد يبي يسوي حلبه مصارعه 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