./BlackBird# Posted July 3, 2013 Share Posted July 3, 2013 الاخطاء ان الايفنت سيرفر و getLocalPlayer() كلنت و اسم الفنكشن مو مثل الي في الايفنت Link to comment
AHMAD1234 Posted July 3, 2013 Share Posted July 3, 2013 edit #2: حاوت اسوي كود اذا دخل الاعب يكون معه درع ماعرفت function showArmor ( ) الوضيفه local me = getLocalPlayer ( ) المصدر local armor = getPlayerArmor ( 100 ) الدرع كم outputChatBox( "Your armor: " .. armor, me ) اخراج كلام بالشات end النهايه addEventHandler("onPlayerJoin", getRootElement(), joinHandler)عند دخول الاعب جربته ماشتغل الكود الاصلي function showArmor ( ) local me = getLocalPlayer ( ) local armor = getPlayerArmor ( me ) outputChatBox( "Your armor: " .. armor, me ) end addCommandHandler ( "showarmor", showArmor ) اولاً:- بخصوص الكود هادى الكود فايدته مو يعطيك درع فايدته انه يعلمك كم معك من نقاط الدرع لمى يدخل اللاعب باخراج نص في الشات ثانياً:- التصحيح حق الكود يصير كذا function giveArmor ( ) setPedArmor ( source, 100 ) outputChatBox( "الدرع بنجاح "..getPlayerName(source).."تم اعطاء اللاعب",source,255,0,0,true ) end addEventHandler("onPlayerJoin", getRootElement(), giveArmor) Link to comment
ABO-SR777777A Posted July 3, 2013 Author Share Posted July 3, 2013 اتمنى من الجميع ماتوصل الصفحه 10 الا اانا متعلم المبرجمه ان شاء الله وانا بسوي اكواد سهله ولو في خطأ تقولوي فين الخطأ وهذا ليش جا كذا وهذا كذا يعني تشرحلي الكود كامل عشان استفيد Link to comment
AHMAD1234 Posted July 3, 2013 Share Posted July 3, 2013 اتمنى من الجميع ماتوصل الصفحه 10 الا اانا متعلم المبرجمه ان شاء اللهوانا بسوي اكواد سهله ولو في خطأ تقولوي فين الخطأ وهذا ليش جا كذا وهذا كذا يعني تشرحلي الكود كامل عشان استفيد 100 اوكي انا معاك ان شاء الله الين الصفحة ...بس اتمنى انك تكون متقبل للشرح Link to comment
ABO-SR777777A Posted July 3, 2013 Author Share Posted July 3, 2013 طيب وش باقيلي الحين بتعلم Link to comment
ABO-SR777777A Posted July 3, 2013 Author Share Posted July 3, 2013 بسوي كود اذا مات يعيده في مكان ثاني اعطيني الوضايف وانا احاول اسويها Link to comment
ABO-SR777777A Posted July 3, 2013 Author Share Posted July 3, 2013 [b]addEventHandler("onResourceStart", resourceRoot, function() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) local spawns = { } spawns[1] = { } spawns[1].x = هذا اول لما لاعب يموت ذذ spawns[1].y = مثلآ مثل بسول لما يموت يروح المستشفي spawns[1].z = spawns[1].rot = 280.0 spawns[2] = { } spawns[2].x = هذا لما يدخل الاعب ذذ spawns[2].y = spawns[2].z = spawns[2].rot = 280.0 local rnd = math.random( #spawns ) spawnPlayer( player, spawns[rnd].x, spawns[rnd].y, spawns[rnd].z, spawns[rnd].rot ) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, source) end[/b]) حط احدثياتك اول واحده لما يموت يروح للحدثيات التانية لما يدخل الاعب ماني فاهم الكود مره Link to comment
ABO-SR777777A Posted July 3, 2013 Author Share Posted July 3, 2013 اوك بحاول اسويه ثواني بس Link to comment
ABO-SR777777A Posted July 3, 2013 Author Share Posted July 3, 2013 سويته ماشتغل ادخل الشاشه سوده [b]addEventHandler("onResourceStart", resourceRoot, function() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) local spawns = { } spawns[1] = { } spawns[1].1640.3233642578 = هذا اول لما لاعب يموت ذذ spawns[1].-1340.1821289063 = مثلآ مثل بسول لما يموت يروح المستشفي spawns[1].17.453125 = spawns[1].rot = 280.0 spawns[2] = { } spawns[2].1640.3233642578 = هذا لما يدخل الاعب ذذ spawns[2].-1340.1821289063 = spawns[2].17.453125 = spawns[2].rot = 280.0 local rnd = math.random( #spawns ) spawnPlayer( player, spawns[rnd].x, spawns[rnd].y, spawns[rnd].z, spawns[rnd].rot ) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, source) end[/b]) Link to comment
AHMAD1234 Posted July 3, 2013 Share Posted July 3, 2013 (edited) لول قاعد اسويها يا رجل احسلك سوي شئ ثاني كذا راح تنلحس لول Edit: = وبعدين انت حاط الاحداثيات قبل الـ spawns[1].1640.3233642578 = هذا اول لما لاعب يموت ذذ spawns[1].-1340.1821289063 = مثلآ مثل بسول لما يموت يروح المستشفي spawns[1].17.453125 = spawns[1].rot = 280.0 Edited July 3, 2013 by Guest Link to comment
ABO-SR777777A Posted July 3, 2013 Author Share Posted July 3, 2013 ههههههههه خلها ع ربك بس Link to comment
TaRK.[$]<~ Posted July 3, 2013 Share Posted July 3, 2013 حبيبي حبه حبه وتعرف كل شي اسمعه من مجرب لأ تقول مقدر ول معرف مع اليام تعرف كل شي Link to comment
ABO-SR777777A Posted July 3, 2013 Author Share Posted July 3, 2013 [b]addEventHandler("onResourceStart", resourceRoot, function() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) local spawns = { } spawns[1] = { } spawns[1].x = 1640.3233642578 spawns[1].y = -1340.1821289063 spawns[1].z = 17.453125 spawns[1].rot = 280.0 spawns[2] = { } spawns[2].x = -2240.5810546875ذ spawns[2].-1724.90014648443 = spawns[2].480.47290039063 = spawns[2].rot = 280.0 local rnd = math.random( #spawns ) spawnPlayer( player, spawns[rnd].x, spawns[rnd].y, spawns[rnd].z, spawns[rnd].rot ) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, source) end[/b]) كذا صح Link to comment
ABO-SR777777A Posted July 3, 2013 Author Share Posted July 3, 2013 حبيبي حبه حبه وتعرف كل شي اسمعه من مجرب لأ تقول مقدر ول معرف مع اليام تعرف كل شي ماعليك اللهه يوففقنا Link to comment
ABO-SR777777A Posted July 3, 2013 Author Share Posted July 3, 2013 addEventHandler("onResourceStart", resourceRoot, function() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) local spawns = { } spawns[1] = { } spawns[1].x = هنا احدثيات المستشفي spawns[1].y = مايصير تسوي الاحدثيات نفسها ذذ spawns[1].z = تأكد من الاحدثيات ذذ لا تخرب شيء spawns[1].rot = 280.0 spawns[2] = { } spawns[2].x = spawns[2].y = spawns[2].z = spawns[2].rot = 280.0 local rnd = math.random( #spawns ) spawnPlayer( player, spawns[rnd].x, spawns[rnd].y, spawns[rnd].z, spawns[rnd].rot ) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, source) end ) ياريت تفهمني مستشفى ايش الاحداثيات ماهي مثل بعض Link to comment
ABO-SR777777A Posted July 3, 2013 Author Share Posted July 3, 2013 [b]addEventHandler("onResourceStart", resourceRoot, function() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) local spawns = { } spawns[1] = { } spawns[1].x = 1640.3233642578 اذا مات الاعب spawns[1].y = -1340.1821289063 spawns[1].z = 17.453125 spawns[1].rot = 280.0 spawns[2] = { } spawns[2].x = -2240.5810546875 ااذا دخل الاعب spawns[2].-1724.90014648443 = spawns[2].480.47290039063 = spawns[2].rot = 280.0 local rnd = math.random( #spawns ) spawnPlayer( player, spawns[rnd].x, spawns[rnd].y, spawns[rnd].z, spawns[rnd].rot ) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, source) end[/b]) Link to comment
ABO-SR777777A Posted July 3, 2013 Author Share Posted July 3, 2013 ياخي والله تعبت معاكشوف حط الاحدثيات فوق هذه لو الاعب مات يروح له التانية لما لاعب يدخل :@ معليش تعبتك Link to comment
AHMAD1234 Posted July 3, 2013 Share Posted July 3, 2013 [b]addEventHandler("onResourceStart", resourceRoot, function() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) local spawns = { } spawns[1] = { } spawns[1].x = 1640.3233642578 spawns[1].y = -1340.1821289063 spawns[1].z = 17.453125 spawns[1].rot = 280.0 spawns[2] = { } spawns[2].x = -2240.5810546875ذ spawns[2].-1724.90014648443 = spawns[2].480.47290039063 = spawns[2].rot = 280.0 local rnd = math.random( #spawns ) spawnPlayer( player, spawns[rnd].x, spawns[rnd].y, spawns[rnd].z, spawns[rnd].rot ) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, source) end[/b]) كذا صح خطأ هنا spawns[2] = { } spawns[2].x = -2240.5810546875ذ spawns[2].-1724.90014648443 = spawns[2].480.47290039063 = spawns[2].rot = 280.0 يا رجل نصيحه حاول تسوي شي ثاني غير ذا spawns[2] = { } spawns[2].x = -2240.5810546875 spawns[2].z = -1724.90014648443 spawns[2].y = 480.47290039063 spawns[2].rot = 280.0 Link to comment
ABO-SR777777A Posted July 3, 2013 Author Share Posted July 3, 2013 انا بسوي لما يدخل الاعب يبدآ انا لو دخلت الشاشه سوده Link to comment
ABO-SR777777A Posted July 3, 2013 Author Share Posted July 3, 2013 [b]addEventHandler("onResourceStart", resourceRoot, function() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) local spawns = { } spawns[1] = { } spawns[1].x = 1640.3233642578 spawns[1].y = -1340.1821289063 spawns[1].z = 17.453125 spawns[1].rot = 280.0 spawns[2] = { } spawns[2].x = -2240.5810546875 spawns[2].z = -1724.90014648443 spawns[2].y = 480.47290039063 spawns[2].rot = 280.0 local rnd = math.random( #spawns ) spawnPlayer( player, spawns[rnd].x, spawns[rnd].y, spawns[rnd].z, spawns[rnd].rot ) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, source) end[/b]) كنت عارف الخطأ Link to comment
ABO-SR777777A Posted July 3, 2013 Author Share Posted July 3, 2013 سويت كود fps ماينزل يكون 100 function fpsFunction( player, command, limit ) if hasObjectPermissionTo ( player, "function.setFPSLimit" ) setFPSLimit ( 100 ) end end addCommandHandler ( "setfps", fpsFunction ) وين الخطأ ولو في حطأ قولولي واعدله بنفسي Link to comment
Recommended Posts