Leaderboard
Popular Content
Showing content with the highest reputation on 20/05/17 in Posts
-
4 points
-
تعبناكم معنا وأشغلناكم شكراً لكم, لكل من ساعدني @#DRAGON!FIRE @Master_MTA @#_iMr.[E]coo @Deativated تمت الإفادة من قبل المبرمجين ^3 points
-
Debugging Do you know what debugging is? You might think you do, but unfortunately (in my opinion) only ~15% of the scripters in the community do know the full definition of it. Many people think that debugging code is the same as looking in to the Debug Console and waiting for warning + errors to show up. That's indeed debugging and yet it never provide all information you need to build your scripts. It only can say what goes wrong at a certain line. With other words, the Debug Console by default will only show a limited amount of mistakes you have made in your code. So what is next? You fixed all warnings and errors and yet it doesn't work. You start with making your code visible! I guess 70% would think: Making code visible? Ehhh how??? Let me write it down a little bit different: By using Debug Information making the behaviour of the code visible. I guess 50% would think: Eh what? behaviour of code????? Let me give you an example. Example: (1) outputDebugString("the script has started") -- < this is a debug line if true then outputDebugString("code works here") -- < this is a debug line else outputDebugString("code shouldn't be working here") -- < this is a debug line end Debug console "the script has started" "code works here" The debug console is NOT information for players, it is information for YOU developers! BTW this is a debug line outputDebugString("test") -- < this is a debug line In this case it is just a piece of code that shows information in the debug console. Example: (2) local playerName1 = "snake1" local playerName2 = "cow" if playerName1 == playerName2 then outputDebugString("players playerName1 and playerName2 do share the same name. Name: " .. tostring(playerName1)) -- < this is a debug line else outputDebugString("players playerName1 and playerName2 do NOT share the same name. playerName1: " .. tostring(playerName1) .. ", playerName2: " .. tostring(playerName2)) -- < this is a debug line end Debug console "players playerName1 and playerName2 do NOT share the same name. playerName1: snake1, playerName2: cow" Easy isn't? The concept behind this debug method is to see what the code does / doesn't execute. Is this method handy? It is actually the very basic of debugging, for code that doesn't contain any errors/warnings. I would say it is handy and it is a very powerful method too. It is also handy for people who do not know how to script. If you want people to help you with your code, but you do not know what is wrong with it. You can add those debug lines and point out to where the code stops working. This will make it more efficient for you and the scripter to work out the problem, because the scripter knows where to look. How much debug lines do you have to add to your script? 1? 10? 100? 1000? You could start with around 100 debug lines and as you learn how to script, you can reduce it to 10+ debug lines. Too much debug lines are not always good, because they will give you too much information and it will cost time to manually filter them. So I recommend you to remove some of them afterwards. When you are finished with the tested code, you can remove 90+% of them. Feel free to disable them instead of removing them, if you know that you are going to need them again. For complex code, I use around 25 debug lines, SO DON'T HOLD BACK! Render events It is strongly recommended to remove debug lines that are executed on onClientRender/render events when you are finished with your code. Because that can have influence on the smooth fps.(It will not drop much of the fps, but it can make it feel unsmooth) Clearing the debug console? /cleardebug Know your tools: outputDebugString -- Show a message on the Debug Console bool outputDebugString ( string text, [ int level=3, int red=255, int green=255, int blue=255 ] ) --- outputConsole -- Show a message on the F8 panel. bool outputConsole ( string text ) -- client bool outputConsole ( string text, [ element visibleTo=getRootElement() ] ) -- server --- inspect -- Convert one mixed value to a string. string inspect ( mixed var ) --- print -- Show a message on the terminal / serverwindow / Debug Console. bool print ( string var1[, string var2, string var3...] ) --- tostring() -- Convert a value in to a string. (but for objects/elements, inspect works better) --- iprint -- Show a message on the terminal / serverwindow / Debug Console (convert multiple mixed values automatic to string, no need for tostring or inspect) bool iprint ( mixed var1[, mixed var2, mixed var3...] ) --- outputChatBox -- You can also debug with outputChatBox (even though it is less efficient) bool outputChatBox ( string text [, int r=231, int g=217, int b=176, bool colorCoded=false ] ) -- client bool outputChatBox ( string text [, element visibleTo=getRootElement(), int r=231, int g=217, int b=176, bool colorCoded=false ] ) -- server Debug message levels 0: Custom message 1: Error message 2: Warning message 3: Information message (default) Addition by @Hale https://wiki.multitheftauto.com/wiki/OutputDebugString Advanced tools: local line = debug.getinfo(1).currentline -- get the line of the script where the code has been executed. 1 = current function. (can be useful if you want to get the line where this function has been called from) https://www.lua.org/pil/23.1.html WIKI MTA: WIKI MTA debugging tutorial/information. https://wiki.multitheftauto.com/wiki/Debugging2 points
-
I brought you bakaGaijin and Ash Now I bring Discord integration with MTA scripts. MTA already has this for IRC Shoutout to the people who made the Sockets module, you're awesome. Features: -Scripts can echo messages to any Discord text channel of their choosing. -Any Discord channel can be set up to echo all messages to an ingame script. (Including the name of the person who said it, and his role) -One MTA server can send/receive to multiple Discord guilds. Example use: To show how this is useful, I made a small program to echo all global chat to a "global" Discord channel, and all team chats to individual "team" Discord channels. These Discord channels ofc echo messages back when someone posts. As proof of concept for commands, if a Discord user types "!ban name" then his role is checked, and if it includes Founder, the chat outputs "name was banned!" This is the client side script I used for this example: local SECRET_KEY = "15-A-53CR3T-K3Y" --The script works even if your server IP changes. You are mapped to a unique key. local function onopen(self) self:send(SECRET_KEY) --Your MTA server logs in addEventHandler("onResourceStop", resourceRoot, function() self:close() --Break off from Discord end) addEventHandler("onPlayerChat", getRootElement(), function(message, type) --Example hook to capture player chats local name = getPlayerName(source) local channel = "global" --Send to global channel if global chat if type==2 then channel = getTeamName(getPlayerTeam(source)) end --Or team channel if teamchat --Format to send messages is ("discord", channelName, message) self:send("discord", channel, name..": "..message) end) end function onmessage(self, data) local channelName, name, role, message = data[3], data[4], data[5], data[6] local orginal_message = message --The message we got from discord message = "("..role..") "..name..": "..message --Make it pretty if channelName=="global" then --Output to global chat or team chat outputChatBox("(DISCORD) "..message) else local team = getTeamFromName(channelName) local members = getPlayersInTeam(team) or {} local r, g, b = getTeamColor(team) --Color the output for lulz for _, player in ipairs(members) do outputChatBox( "(DISCORD) (TEAM) "..message, player, r, g, b) end end local commandExample = string.match(orginal_message, "^!ban (.+)") --If message started with !ban... if role=="Founders" and commandExample then -- ...and the person who said it had the right Role outputChatBox(commandExample.." was banned!", getRootElement(), 255, 0, 0) end end local function onclose() outputChatBox("The Discord link was closed") end local discord = Discord.new(onopen, onmessage, onclose) That's 41 lines of code, now let's see it in effect. I would love to hear what you think about it.1 point
-
السلام عليكم ورحمة الله وبركاته اما بعد افتتاح هذا السيرفر فقصة هذا السيرفر جائت علي يد DABL فهذا السيرفر نشتغل عليه بقالنا سنة و3 شهور ما اطول عليكم المبرمجين :- DABL,justboy,#CroSs,Me[Z]oO,xProGamer نيجي للبداية V لوحة التسجيل :- الانترو :- كاميرا تتحرك وليست صور لتجنب التقليد الازرار:- F1 F3 وهذه ليست حق TAPL بل DABL ض سيارتك اذا لم تركنها سوف تنسحب من قبل وظيفة سحب السيارات المخالفة اماكن الركن شركة الحجز لو تريد تسترجع السيارة F4 F5 مت متطورة حيث يمكنك وضع لايك علي المساعد الذي يعجبك F6 يمكنك اختيار العلامة الذي تضعها علي الفريق متطورة جدا وهذه ليست حق TAPL بل DABL ض F7 F9 F10 TAB :- السكربتات :- محل الملابس :- نظام الهود :- الانرجي هذه الطاقة وهي تقل بتحركاتك ويمكنك ان تملأها عن طريق محلات الاطعمة محل الاسلحة :- هنا مختلف عن كل المحلات هذه عليك ان تشتري السلاح اولا ثم تشتري الطلقات عندما تشتري سلاح لونه يصير اخضر بالقريد لست السبيد موتور :- محل الاطمعة :- السجن :- محل السيارات :- يوجد سرعات للسيارات محل تعديل السيارات :- محل التمويل :- غسيل السيارات :- البنك :- يمكنك اخذ قرض ولكن بعد انتهاء المدة سوف تعاقب ازالة القواضي :- محل الاغراض :- التحدي :- المطار :- ب الاحتلال :- نظام البيوت :- هذه اللوحة للمسؤولين فقط ^ نظام المقرات :- يوجد مقرات يممكنك شرائها بدل من الطلب من الصاحب نظام التحكم بالشات :- نظام انشاء عضوية خاصة :- مقر سوات :- الوظائف :- وظيفة الشرطي وظيفة رجل اطفاء الحريق وظيفة سرقة المحل وظيفة ساحب السيارات وظيفة عامل النظافة المهمات :- مهمة حرب السيارات مهمة سباق السباحة مهمة اخر سيارة تتبقي عند سقوط كل السيارات مهمة الرجل الاخير مهمة الصياد هذه مهمة نادرة حيث انه تختار لاعب عشوائي يمكنه التحول الي اي اوبجيكت في اللعبة ومن يعثر علي هذا اللاعب يفوز الاي بي :- mtasa://194.135.83.180:27715 والسلام عليكم ورحمة الله وبركاته <31 point
-
Hello everyone, nothing to say so. LUA: function dxDrawCircle( x, y, width, height, color, angleStart, angleSweep, borderWidth ) height = height or width color = color or tocolor(255,255,255) borderWidth = borderWidth or 1e9 angleStart = angleStart or 0 angleSweep = angleSweep or 360 - angleStart if ( angleSweep < 360 ) then angleEnd = math.fmod( angleStart + angleSweep, 360 ) + 0 else angleStart = 0 angleEnd = 360 end x = x - width / 2 y = y - height / 2 if not circleShader then circleShader = dxCreateShader ( "circle.fx" ) end dxSetShaderValue ( circleShader, "sCircleWidthInPixel", width ); dxSetShaderValue ( circleShader, "sCircleHeightInPixel", height ); dxSetShaderValue ( circleShader, "sBorderWidthInPixel", borderWidth ); dxSetShaderValue ( circleShader, "sAngleStart", math.rad( angleStart ) - math.pi ); dxSetShaderValue ( circleShader, "sAngleEnd", math.rad( angleEnd ) - math.pi ); dxDrawImage( x, y, width, height, circleShader, 0, 0, 0, color, true ) end function dxDrawRoundedRectangle( x, y, width, height, radius, color ) if ( radius >= width ) or ( radius >= height ) then dxDrawCircle( x - ( radius / 2 ), y - ( radius / 2 ) ) end -- The radius is relative to the height and width of the rectangle, so to avoid rectangles if the radius is bigger than the width or height then a complete circle is being drawn. dxDrawCircle( x + ( radius / 2 ), y + ( radius / 2 ), radius, radius, color, 270, 90 ) dxDrawCircle( x + ( radius / 2 ), ( y + height ) - ( radius / 2 ), radius, radius, color, 180, 90 ) dxDrawCircle( ( x + width ) - ( radius / 2 ), y + ( radius / 2 ), radius, radius, color, 0, 90 ) dxDrawCircle( ( x + width ) - ( radius / 2 ), ( y + height ) - ( radius / 2 ), radius, radius, color, 90, 90 ) dxDrawRectangle( x, y + ( radius / 2 ), width, ( height ) - ( radius ), color, true ) dxDrawRectangle( x + ( radius / 2 ), y , ( width ) - ( radius ), ( radius / 2 ), color, true ) dxDrawRectangle( x + ( radius / 2 ), ( y + height ) - ( radius / 2 ), ( width ) - ( radius ), ( radius / 2 ), color, true ) end CIRCLE.FX ( The one from the MTA Wiki ) float sCircleHeightInPixel = 100; float sCircleWidthInPixel = 100; float sBorderWidthInPixel = 10; float sAngleStart = -3.14; float sAngleEnd = 3.14; //------------------------------------------------------------------------------------------ // PixelShaderFunction // 1. Read from PS structure // 2. Process // 3. Return pixel color //------------------------------------------------------------------------------------------ float4 PixelShaderFunction(float4 Diffuse : COLOR0, float2 TexCoord : TEXCOORD0) : COLOR0 { float2 uv = float2( TexCoord.x, TexCoord.y ) - float2( 0.5, 0.5 ); // Clip unwanted pixels from partial pie float angle = atan2( -uv.x, uv.y ); // -PI to +PI if ( sAngleStart > sAngleEnd ) { if ( angle < sAngleStart && angle > sAngleEnd ) return 0; } else { if ( angle < sAngleStart || angle > sAngleEnd ) return 0; } // Calc border width to use float2 vec = normalize( uv ); float CircleRadiusInPixel = lerp( sCircleWidthInPixel, sCircleHeightInPixel, vec.y * vec.y ); float borderWidth = sBorderWidthInPixel / CircleRadiusInPixel; // Check if pixel is inside circle float dist = sqrt( dot( uv, uv ) ); if ( ( dist > 0.5 ) || ( dist < 0.5 - borderWidth ) ) return 0; else return Diffuse; } //------------------------------------------------------------------------------------------ // Techniques //------------------------------------------------------------------------------------------ technique tec0 { pass P0 { PixelShader = compile ps_2_0 PixelShaderFunction(); } }1 point
-
كلامك صحيح , يقولك حصريات في النهاية يركب لك اشكال سيارات وسكنات :# , انا اقوم اتعشى احسن لي لاتقهروني زيادة1 point
-
اسف على ردي واصلا ما العب رول بلاي كثير لكن اشوف اكثر من 50 سيرفر حياة واقعية عربي كلها نفس النظام ونفس المودات كلها متشابهة من ضمنهم هذا اللي حاطه بالموضوع ففكرة الحياة الواقعية صار سيء جدا وملل مافيه شي يحمس واسم السيرفر تقليد لحق ماستر والحقيقة مدري من المقلد الحقيقي ومثل م قالو فوق ماله علاقة بالاعمال او شي كما قلت مثل باقي السيرفرات م اقصدك احطمك1 point
-
حنا نغير يعسل معليك لا بغيت تشوفنا تعال حياك وهذا اللي اقوله مشكور يعسل ذذ1 point
-
بعد تسريب مودات الحياة الواقعية صار الكل , يسوي له سيرفر واقعي حتى وصلو 65 سيرفر حياة واقعية عربي العرب اذ طاحو في مودات ماراح يغيرونها الا بعد 5سنوات مثل , التكتيك مثل , الهجولة ! مو قصدي احطمك بس مانزلت شي جديد , غير سكنات واشكال سيارات موفقء1 point
-
1 point
-
والله من وجهة نظري 30-20ريال تقريبا لان الخصائص اللي فيه مب واجد لكن فكرة المود حلوة1 point
-
1 point
-
onClientRender is fine, just the id check and communication between the server can be optimised. Update time to check the distance You also increase (~50ms) the update time with getTickCount as you did before. (that gives you somehow less lagg than a 50 ms timer)1 point
-
1 point
-
انا شخصياً انصحك بهذي القناة https://www.youtube.com/user/EssaadaniTV تعلمت منها C#1 point
-
1 point
-
@#BrosS متأكد ولا تبي تمشيها علينا ض @Master_MTA لو ركبت كودك وزرفت موداتي على سبيل المثال وماشتغلت معك او انحذفت الملفات اول مادخل سيرفرك وانا مركب كودك وسريالي موجود راح يشتغل معاي المود ولا كأنك حاط كود للحذف فهمت علي , الحل انك تسويه بقاعدة بيانات ويكون فيه كولمن لايبي السيرفر وتتقدر تضيف وتحذف من قاعدة البيانات الايبيات الي تبيها ولك موضوع اول معطيك كود كيف تجيب اي بي السيرفر1 point
-
elseif id == 602 or id == 496 or id == 401 or id == 518 or id == 527 or id == 589 or id == 419 or id == 587 or id == 533 or id == 526 or id == 474 or id == 545 or id == 517 or id == 410 or id == 600 or id == 436 or id == 439 or id == 549 or id == 491 or id == 485 or id == 431 or id == 438 or id == 437 or id == 574 or id == 420 or id == 525 or id == 408 or id == 552 or id == 416 or id == 433 or id == 427 or id == 490 or id == 528 or id == 407 or id == 544 or id == 523 or id == 470 or id == 596 or id == 598 or id == 599 or id == 597 or id == 432 or id == 601 or id == 428 or id == 499 or id == 609 or id == 498 or id == 524 or id == 532 or id == 578 or id == 486 or id == 406 or id == 573 or id == 455 or id == 588 or id == 403 or id == 423 or id == 414 or id == 443 or id == 515 or id == 514 or id == 531 or id == 456 or id == 459 or id == 422 or id == 482 or id == 605 or id == 530 or id == 418 or id == 572 or id == 582 or id == 413 or id == 440 or id == 543 or id == 583 or id == 478 or id == 554 or id == 579 or id == 400 or id == 404 or id == 489 or id == 505 or id == 479 or id == 442 or id == 458 or id == 536 or id == 575 or id == 534 or id == 567 or id == 535 or id == 576 or id == 412 or id == 402 or id == 542 or id == 603 or id == 475 or id == 429 or id == 541 or id == 415 or id == 480 or id == 562 or id == 565 or id == 434 or id == 494 or id == 502 or id == 503 or id == 411 or id == 559 or id == 561 or id == 560 or id == 506 or id == 451 or id == 558 or id == 555 or id == 477 or id == 441 or id == 464 or id == 594 or id == 501 or id == 465 or id == 564 or id == 606 or id == 607 or id == 610 or id == 584 or id == 611 or id == 608 or id == 435 or id == 450 or id == 591 or id == 590 or id == 538 or id == 570 or id == 569 or id == 537 or id == 449 or id == 568 or id == 424 or id == 504 or id == 457 or id == 483 or id == 508 or id == 571 or id == 500 or id == 444 or id == 556 or id == 557 or id == 471 or id == 495 or id == 539 then Woow, this very very very inefficient. O_o + > onClientRender < I suggest to follow a table tutorial. local vehicleIDs = { car = { [501] = true, [465] = true, [607] = true, [571] = true } boat = { -- etc. } } elseif vehicleIDs.car[id] then -- do your stuff elseif vehicleIDs.boat[id] then -- do your stuff and you might want to consider using: https://wiki.multitheftauto.com/wiki/TriggerLatentServerEvent Since you trigger it every second, you have to take in account that not everybody has great internet. I would strongly recommend to send it every 10 or even 20 seconds. What does 10 seconds matter when they are an hour in the server?1 point
-
1 point
-
هذا يصنع لك الجداول بكل سهولة كل اللي عليك تجيب الاحداثيات وتضغط على شي زر من اللي تحت اللي هم للجداول وتروح لملف عادي وتلسق الشي اللي اتنسخ تلقائي لمن انت ضغط على زر جدول معين1 point
-
5 دولارات مشفر 7 غير مشفر فكرته رهيبة <31 point
-
1 point
-
1 point
-
1 point
-
Aprovechando que hoy he tenido tiempo libre y me he descargado el 3DS Max, quisiera compartir aquí en el foro algunos de los proyectos que realizaré en él para que otra gente pueda usarlos en servidores, para uso personal, etc. De momento haré mods simples como edits de skins de GTA:SA low poly (sin lag) hasta que vuelva a pillarle el truco. Aquí dejo mi primer trabajo hecho hoy: https://www.dropbox.com/s/1gxo9xvbt6xtgqo/bmost-id15.rar?dl=01 point
-
الاسلحة تنحفظ والشخصية + الحساب ينحفظ على الجهاز الي دخلت فيه , يسجل سريالك اتوماتيكي , + فيه نظام حفظ اغراضك ماتضيع الا لما تموت ,, يعني لو تدخل بجهاز ثاني راح يسويلك حساب على سريالك كل جهاز وله حسابه ! الزومبي حذفناه لطلب الزوار على ذلك , الزوار مايبون زومبي يبون حروب فقط بدون زومبي , راح نسوي تصويت ثاني اننا نسترجعه ونشوف فيه ناس كثير يدخلون السيرفر يوصل الي 20لاعب يوميا , لكن هذي كما تعرف فترة اختبارات انتظر بعد هذا السبوع وتشوف + اشكرك على مرورك واقتراحتك التحديث الجديد , والإضافات الجديدة 1 - تم إضافة الانشر الي اسلحة عديدة 2 - تم إضافة ملابس جديدة وخوذات جديدة 3 - تم إضافة قطع سيارات جديدة مثل الزجاج و التدريع 4 - تم إضافة الفولاذ بإمكانك وضعه بالسيارة للتصفيح وعدم اختراق الرصاص لها 5 - تم إضافة الامكانية بتعديل زجاج السيارة بحيث يصبح مضاد للرصاص وغير قابل لأختراقه 6 - تم تعريب وإضافة قائمة الصنع بأمكانك الان صنع الاسلحة والملابس والاكل والاطعمة والمشروبات 7 - تم إضافة اسلحة جديدة وكثيرة بمميزات ساحقة , تم إضافة تلغيم بأمكانك وضعه بالشوارع وبالسيارات لتفخيخها 8 - تم إضافة جرافسيك جديد , تم إضافة السماء الواقعية , تم إضافة شوارع مكسرة وشوارع ثلجية , تم إضافة شوارع رملية 9 - توزيع تلقائي كل يوم جمعة فيب , بأمكانك استخدام الفيب كل 30دقيقة , ويعطيك منه خرائط واسلحة ورصاص واطعمة وقطع سيارات 10 - تم خفض التحميل الي 180ميغا , وتم ازالة الاق تماما , تم إضافة سيارات جديدة بمميزات رائعة , تم إضافة الخلاط بأمكانك وضعة على الهمر والددسن * * ! تبقى انتم #Edit: هدية جديدة للاعبين الجدد * * معك قروب؟ تبي مقر ؟ لازم يكون بقروبك على الاقل 5 أعضاء المقر مجانا Free * * #Edit: الإضافات والتعديلات الجديدة 1 - تعريب الحقيبة بالنمط البسيط 2 - تعريب لوحة المعلومات الإضافات الجديدة 1 - إضافة عوالم جديدة 2 - إضافة مباني شبيهة للعبة ارما3 3 - إضافة طرق مكسرة وقديمة وحواجز 4 - إضافة طائرة تسقط كل 45دقيقة وداخلها موارد 5 - إضافة مود السفن , بحيث عندما تأتي سفينة تستطيع سرقة مواردها 6 - تحتوي السفن على بضائع مسلحة واطعمة وملابس وقطع فولاذ 7 - إضافة طرق عشبية وأماكن قديمة بأشكال شبيهة لأرما3 8 - إضافة اسلحة جديدة وإضافة لغة عربية جديدة وهذا فيديو في السيرفر تقدر تشوفون المباني الشبيهة بلعبة ارما3 وتم إضافة عوالم ومناطق جديدة لكن لم تظهر بالفيديو الإضافات والمباني الجديدة , مع إمكانية الدخول بداخلها والاحتماء بها 1 - الشجر المطابق للواقع 2 - مبنى مشابة للعبة ارما 3 مع إمكانية الاحتماء بداخل 3 - هذة الطائرة التي تسقط كل 45دقيقة في أماكن عشوائية 4 - هذا برج مراقبة بأمكانك الصعود بداخلة وقتل الاعداء او مراقبتهم 5 - هنا مكان الجيش , مكان حربي ويجتمع الاعبين فيه للقتال , تم إضافة مباني رائعة 6 - هذا المبنى شبية بـ لعبة ارما3 , بأمكانك الاحتماء بداخل نأسف على التالي , علماً ان التحميل بالسيرفر وصل الي 210ميغابايت وهذا التحميل يعتبر صغير مقارنة بالسيرفرات الاخرى والسيرفر يستحق كل هذا التحميل الي طلب شرح كيفية اللعب بالسيرفر , تفضل #Edit: تم إضافة مودالفصولالاربعة 1 - الصيف , بحيث تكون الشمس قوية وحارقة , ويجب ان تبتعد عنها لكي لاتأثر عليك ويجب عليك إستعمال السوائل كثيرا لكي تبقى على قيد الحياة 2 - الشتاء , يجب عليك عدم التبلل بالمياة كي لاتمرض وإشعال النار لأبقاء الجسم دافيء 3 - الخريف , يسقط أوراق الشجر بالكامل , بحيث يكون جميع الاشجار بدون أوراق 4 - الربيع , افضل الفصول , احذر فقط من الاعبين ! #Edit: التحديث الجديد تم إضافة إمكانية صنع الشيتل ميتل الذي تصلح به السيارة تم إضافة إمكانية صنع سلاح جاهلي , وهو سلاح يتكون من خشب ورصاصة من خشب المتطلبات : خشب وسبرنق #Edit: تم إضافة [ Top Panel ] 1 - تظهر اعلى ساعات الاعبين 2 - تظهراعلى لاعب يقتل 3 - تظهر عدد الهيد شوت 4 - تظهر أضعف الاعبين يتم الفتح من [ F7 ] #Edit: تم إضافة مود سقوط الاطعمة والاسلحة من الطائرات كل 45دقيقة تسقط حقائب بمظلة من الطائرات يوجد فيها طعام - اسلحة - ادوية انت وحظك #Edit: تم إضافة مود الوقت الواقعي الصباح = صباح باللعبة الليل = ليل حالك الظلام باللعبة1 point
-
1 point
-
Buenos como estaba aburrido y sigo en youtube a un programador de la universidad de NY decidí ver uno de sus vídeos y me dije porque no hacerlo en mta así que aquí esta: Os dejo el vídeo en el cual código me base para hacer esto. Source local sX, sY = guiGetScreenSize() local w, h = 600, 700 local x, y = sX*0.5 - w*0.5, sY*0.5 - h*0.5 local len = 100 local angleOffset = 10 local separation = 20 local tick = getTickCount() local baseX, baseY = x + w*.5, y + h local updateLen = false local nodes = {} function setup() table.insert(nodes, {x = baseX, y = baseY - len, angle = 300, len = len, parent = 0, haveChildres = false}) end addEventHandler("onClientResourceStart", resourceRoot, setup) function renderWorkStation() --Render Background dxDrawRectangle(x, y, w, h, tocolor(50, 50, 50, 255)) for i = 1, #nodes do branch(i) end --Create new Nodes if getTickCount() - tick > 500 then for i = 1, #nodes do local node = nodes[i] if not node.haveChildres and len > 2 then createChildrens(i) node.haveChildres = true end end tick = getTickCount() updateLen = true end if updateLen then len = len*0.67 updateLen = false end end addEventHandler("onClientRender", root, renderWorkStation) function getXYFromAngle(angle, len) return math.cos( math.rad( angle ) ) * len, math.sin( math.rad( angle ) ) * len end function createChildrens(index) local parent = nodes[index] local angle = parent.angle - angleOffset --Right local startX, startY = getXYFromAngle(angle, len) table.insert(nodes, {x = startX + parent.x, y = startY + parent.y, angle = angle + separation*2, len = len, parent = index}) --outputChatBox("[Node] Creating node ID => "..#nodes.. " Angle => "..angle) --Left local startX, startY = getXYFromAngle(angle - separation*2, len) table.insert(nodes, {x = startX + parent.x, y = startY + parent.y, angle = angle - separation, len = len, parent = index}) --outputChatBox("[Node] Creating node ID => "..#nodes.. " Angle => "..-angle) end function branch(index) local node = nodes[index] if index == 1 then --dxDrawRectangle(node.x - 2.5, node.y - 2.5, 5, 5, tocolor(255, 0, 0, 255)) dxDrawLine(node.x, node.y, baseX, baseY) else --dxDrawRectangle(node.x - 2.5, node.y - 2.5, 5, 5, tocolor(255, 0, 0, 255)) local color = node.len < 20 and tocolor(75, 200, 75) or tocolor(255, 255, 255) dxDrawLine(node.x, node.y, nodes[node.parent].x, nodes[node.parent].y, color) end end addCommandHandler("changeAngle", function(cmd, angle, sep) angleOffset = tonumber(angle) separation = tonumber(sep) len = 100 nodes = {} setup() end) Esto lo hice porque me aburria así que no es un código ni bien organizado ni pensado para un servidor simplemente for-fun1 point
-
NeXuS™ presents dxScrollText Introduction Do you want to make a scrollable text? It's easy with just a helper. Status IN DEVELOPMENT It's still IN DEVELOPMENT but it's published. Screenshot Usage Go ingame, put the file inside resources, start it, and press F7. After it, create your panel, by left clicking and dragging, and press enter. If you are done with that, start typing, and press enter. Voala, it's done. Download MTA:SA Community Link (At the moment, the download link is unavaible, because the resource got suspended by sbx320. I'm talking with him in PMs, to sort this out. If you need the ready resource, hit me up here with a PM, and I'll send it to you.) Syntax - Source code1 point
-
Hola, recientemente fue que vi un pequeño batch sencillo para mantener el servidor online aqui les proporciono uno mas completico para los curiosos que ademas de mantener el servidor on guarda registro de cuando se apago y clasifica los logs por fecha... Solo para windows! @ECHO OFF TITLE SXRestarter MTA-SA by samt2497 SET opcion_logs=1 SET logmta=mods\deathmatch\logs\server.log SET freinicios=reinicios.log SET server="MTA Server.exe" SET conteo=0 IF NOT EXIST %server% ( COLOR 0C ECHO %server% no encontrado ECHO Presione cualquier tecla para reintentar PAUSE > NUL GOTO EOF ) :START CLS & ECHO. SET hh=%time:~0,2% IF %hh% LSS 10 SET hh=0%time:~1,1% SET msg=[%date%][%hh%:%time:~3,5%] Server IF %conteo% EQU 0 (SET msg=%msg% iniciado.) ELSE SET msg=%msg% reiniciado [%conteo%x]. ECHO %msg% & ECHO %msg%>> %freinicios% SETLOCAL ENABLEEXTENSIONS for /f "tokens=1-4 delims=:,.-/ " %%i in ('echo %time%') do ( set 'hh'=%%i set 'mm'=%%j set 'ss'=%%k set 'ff'=%%l) ENDLOCAL & SET v_Hour=%'hh'%& SET v_Minute=%'mm'%& SET v_Second=%'ss'%& SET v_Fraction=%'ff'% set timestring=%V_Hour%%V_Minute%%v_Second% set v_day= set v_month= set v_year= SETLOCAL ENABLEEXTENSIONS if "%date%A" LSS "A" (set toks=1-3) else (set toks=2-4) for /f "tokens=2-4 delims=(-)" %%a in ('echo:^|date') do ( if "%%a" GEQ "A" ( for /f "tokens=%toks% delims=.-/ " %%i in ('date/t') do ( set '%%a'=%%i set '%%b'=%%j set 'yy'=%%k ) ) ) if %'yy'% LSS 100 set 'yy'=20%'yy'% set Today=%'yy'%-%'mm'%-%'dd'% ENDLOCAL & SET v_year=%'yy'%& SET v_month=%'mm'%& SET v_day=%'dd'% set datestring=%V_Year%%V_Month%%V_Day% if %V_Month%==01 set MN=Enermo if %V_Month%==02 set MN=Febrero if %V_Month%==03 set MN=Marzo if %V_Month%==04 set MN=Abril if %V_Month%==05 set MN=Mayo if %V_Month%==06 set MN=Junio if %V_Month%==07 set MN=Julio if %V_Month%==08 set MN=Agosto if %V_Month%==09 set MN=Septiembre if %V_Month%==10 set MN=Octubre if %V_Month%==11 set MN=Noviembre if %V_Month%==12 set MN=Diciembre echo %datestring% Set savename=%V_Hour%hours_%V_Minute%minutes IF NOT EXIST logs MD logs IF NOT EXIST logs\%V_Year% MD logs\%V_Year% IF NOT EXIST logs\%V_Year%\%MN% MD logs\%V_Year%\%MN% IF NOT EXIST logs\%V_Year%\%MN%\%V_Day% MD logs\%V_Year%\%MN%\%V_Day% IF %opcion_logs% EQU 1 ( ECHO %msg%>> logs\%V_Year%\%MN%\%V_Day%\%savename%.log TYPE %logmta%>> logs\%V_Year%\%MN%\%V_Day%\%savename%.log FOR /L %%i IN (1,1,4) DO ECHO.>> logs\%V_Year%\%MN%\%V_Day%\%savename%.log DEL %logmta% ) GOTO NEXT :NEXT SET /A conteo+=1 CALL %server% GOTO START :EOF1 point
