Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 21/06/17 in all areas

  1. Hello! I started working on a vehicle realism system project, and I would like to introduce it to you. What does the system (will) contain? Currently has: - Custom sounds for vehicles - Custom damage "handling" (scroll down a little bit to see what I mean by that) - Players can't push the vehicles with "bare hands", by just running into them, vehicles will stay in one place, but you can push a car with another car or other vehicle I just started working on this, it is in alpha state, so right now it has a lot of bugs, but not so much that I can't make a video about it, so video coming soon (I already recorded it, I just have to edit, render and upload it)! Will feature: - Panels on vehicles (mostly cars) won't break if you collide with something if you are not going so fast, kind of a bug fix, since GTA SA handles these door and etc. breakings really bad, but if you go with high speed the damage will be applied - Probably a little bit complex (at least more complex than current ones) fuel and some other engine systems - Interaction with vehicles, like opening doors from outside, etc. - More realistic handlings - Realistic ramming system, for example if you hit an other player at high speed, your car won't fly up in the air, making the other player just fall down in front of the vehicle and losing a little bit of health - another example: if you collide with a breakable fence, bollard, lamp or something at high speed, it will break more easily, depending on the object you collided with - Engine failure system - breakdowns - Some basic stuff for cars, like travel meter, indicators and etc. - Custom events and functions, like onVehicleRepair, etc. - Custom siren sounds and sirens, flashers for emergency and other vehicles with sirens - Vehicles will get dirty depending on the surface you drive it on, for example, gets dirty on: mud, grass, sand etc. surfaces, and nothing will happen if you drive on surfaces like: concrete, road, etc. Therefore you will have to get your car to a carwash. That's it for now, I can't remember anything else I wanted to do, if something comes into my mind I will just put it in the "Will feature" section. So what do I mean by custom damage handling? You will see it in the video, but for a short explanation: Right now every vehicle's health will only go down to 650 HP, not below, from there, if you collide with something and the vehicle lost more HP than 75 HP, your vehicle will start releasing smoke from the rear tyres. From now on, your vehicle has an element data, which means that your vehicle is overheating and damaged, that's why there is smoke coming out from it, but not in the regular way. You can damage your vehicle however you want, it won't blow up until it loses 150 or more HP. If your vehicle loses 150 (or more) HP, it will be set on fire at the same spot, next to the rear tyres, just like in GTA IV, however, you can still drive it. From this moment, you have 10 seconds to leave your vehicle and run away, after 10 seconds it will blow up. Of course, you will be able to fix and remove the smoke leaking from the vehicle, but you won't be able to "cancel" the blowing up process by fixing the vehicle. So this is what I mean by "custom damage handling", it is a little bit harder to blow up a vehicle, it's like it has more health, since you can damage it with hands and weapons that doesn't remove more HP than 150 at once. As I already wrote, video will be coming soon! P.S.: Sorry for the (grammar) mistakes in sentences, if I made any, I'm not perfect at English. v0.1 - Custom sounds for vehicles - Custom damage "handling" (scroll down a little bit to see what I mean by that) - Players can't push the vehicles with "bare hands", by just running into them, vehicles will stay in one place, but you can push a car with another car or other vehicle Video:
    4 points
  2. Hello to whoever is reading this topic, today I've decided to take some time and explain in (personally) easiest possible way how to make a drawing or a GUI that will fit all resolutions, no matter if it's 1280x1024 or 640x480. Here are the following steps: Let's say you're using 1280x1024 resolution. You have the following function: dxDrawText("$10000000", 990, 200, 1100, 250, tocolor ( 0, 0, 0, 255 ), 1, "pricedown") Take out the positionings from the function: 990, 200, 1100, 250 Divide 1280 with X positions (990, 1100) separately. You'll get 1280/990=1.292929 and 1280/1100=1.16363 Do the same with Y positions, but use 1024 as that is maximum height (aka Y of the screen). You'll get 1024/200=5.12 and 1024/250=4.096 The numbers you got are the scales that will work in every resolution as they work in your resolution (1280x1024). To use those scales, simply divide the clients' resolution with the scale, for example: screenWidth, screenHeight = guiGetScreenSize() dxDrawText("$10000000", screenWidth/1.292929, screenHeight/5.12, screenWidth/1.16363, screenHeight/4.096, tocolor ( 0, 0, 0, 255 ), 1, "pricedown") That's it! There's an extra scaling you can do for text size, which is tricky to work with (due to text getting blurred, ugly and unreadable) but if you're up for it: screenWidth, screenHeight = guiGetScreenSize() scale = (screenWidth/1280)*(screenHeight/1024) -- this will give you a number that will vary around 1, depending on clients' resolution (if resolution is smaller, scale will be below 1, if higher then above 1) dxDrawText("$10000000", screenWidth/1.292929, screenHeight/5.12, screenWidth/1.16363, screenHeight/4.096, tocolor ( 0, 0, 0, 255 ), scale*1, "pricedown") -- as you can see I multiplied the text size (1) with the scale, which means the text will be bigger or smaller (again, depending on the clients' screen resolution) Hope I helped, please provide some feedback for future references!
    4 points
  3. بسم الله الرحمن الرحيم .. سلام عليكم ورحمة الله وبركاته تم الافتتاح ولله الحمد سيرفر شيوخ العرب .. السيرفر جديد وفيه شويه حصريات نبدأ : المودات والقيم مود : صور القيم مود : الفري روم [F1] : فك القطع [F2] : -- سوف يتم تحويله الى الشات الخاص قريباً الوزنيات والهدرز [F3] : -- من مميزات الهدرز : 1- يسمعه من حولك 2- مساحة صوت الهدرز بحسب سرعة سيارتك القرآن الكريم + والاناشيد [F4] : الانتقالات [F6] : شراء التاجات [ F7 ] الاعدادات العامة [F9] : -- سوف يتم تغييره قريباً المهمات : ( Derby ) : طريقة الدخول : كتابة [ ديربي ] عند فتح المهمة شرح المهمة : تصادم سيارات حتى يبقى اخر شخص ويحصل على مبلغ معين من المال الخصائص : [1] - للأصلاح [2] - للنيترو [3] - للإنقلاب ( Shooter ) : طريقة الدخول : كتابة [ شوتر ] عند فتح المهمة شرح المهمة : أطلاق الصواريخ وتفجير السيارات الاخرى حتى تبقى اخر سيارة وهي الرابحة وتحصل على مبلغ معين من المال الخصائص : [mouse1,lctrl,rctrl] - للأطلاق [lshift,rshift] - للقفز [1] - للأصلاح [2] - للنيترو [3] - للإنقلاب الكونسلية : @Dr.Marco @[ sH!5 ]~|>#Mr,[C]oR @zezoALGnop @iMr.WiFi..! المطورين : @</Mr.Tn6eL> -- السيرفر قيد التطوير ويتم حالياً ملئ الخانات وتغيير السيرفر الى الأفضل === تم إقفال السيرفر للصيانة والاشغال الباقية ! === [ أدعو لي بسلامة بسافر قريب ] وفي أمان الله <3
    2 points
  4. Here's another method as well: Let's say that your dxDrawText looks just like you want it to on a screen resolution of 1440x900. You can use the following way to make it ok on any resolution: local sx_, sy_ = guiGetScreenSize() local sx, sy = sx_/1440, sy_/900 dxDrawText("$123456789", 140*sx, 648*sy, 0*sx, 0*sy, tocolor(0,0,0,255), 0.8*sy,"bankgothic") Now a bit of an explanation on how it works. So you made the text look fine on 1440x900, nice. When you made your text function to look ok on 1440x900 it will look like this: dxDrawText("$123456789", 140, 648, 0, 0, tocolor(0,0,0,255), 0.8,"bankgothic") Now all you do is multiply each value by the "sx" and "sy" you just calculated at the top of the script. This way the position of the text will move accordingly with the resolution. This means that if the text is below the radar on 1440x900 and you use this way then on 1920x1080, 1366x768, 1280x720, etc the text will always be in the same spot, below the radar. And always remember to multiply the scale of the text by the "sy" variable to make it smaller on small resolutions and bigger on big ones. This is just an alternative way to the method which @Hale provided. There's no performance drawbacks or anything to this, use whichever seems easier for you. Hope we help others as I remember I had huge problems with this when I was still new to LUA and drawing stuff on screen .
    2 points
  5. Here's a new shader texture replacement resource: https://community.multitheftauto.com/index.php?p=resources&s=details&id=14436 *Note: your vehicle models must be UV mapped/wrap compatible for it to work, default included infernus.dff is NOT working for that reason and is just a placeholder. (if I get to, might add a working UV mapped model to resource in update at a later point) It allows you to load textures onto vehicles (even for unique instances; same ID and vehicle, different for each player) and vehicle wraps *(see image below for example so you get what I mean.. unique vehicle print)* Also provides you with a learning tool on how to make things like this work with scripting and FX, the technique used here takes NO performance toll on MTA, as it uses GTA texture reference so it will be equal in load. Example as named: (there's also smaller sample icons/images within the resource) The above image is more like a new PAINTJOB.. Also I'd like to give fair credits to @Ren_712 for finishing this custom request to me a while ago, (I went to him because he's reputable in the field of shaders/fx scripting) he created this for especially me, (It doesn't exist nor was published anywhere, he made it from scratch and I paid for it) but it was collecting dust on my HDD so a pity to not share it if I wasn't going to use it. This resource reflects his shader skills, not mine.
    1 point
  6. after randomize it, save the last result in a variable. With the next randomization you will have to check if the new value is not the same as the old one. local lastRandomResult local randomResult repeat randomResult = math.random() until lastRandomResult ~= randomResult lastRandomResult = randomResult
    1 point
  7. Okay, so you asked a question, but you already have the answer as well, what do you expect from us..?
    1 point
  8. local ox = getElementData(vehicle, "gear_f") -- ox can be used after here if ox then -- isn't it false or nil? end getElementData has a different syntax than setElementData. Check wiki pls.
    1 point
  9. Sure thing! "then" in LUA is only used in conjuction with an if-statement. An if-statement works like this: local apples = 5 if (apples == 5) then outputChatBox("I have 5 apples!") outputChatBox("And i really love them!") end As you can see, we simply set a variable called 'apples' to the value of 5 and then, in our if statement, we simply check if the value of apples is equal to 5, and if it is, we execute the code between "then" and "end" (the two outputChatBox function calls). We do not need to write "then" between the two outputChatBox's because that is not how LUA syntax works. You could check the MTA/LUA wiki for better explanation if my explanation wasn't clear enough
    1 point
  10. Remove the "then" on line 5
    1 point
  11. Hello ! I have a MTA:SA RolePlay Server and i don't know how can i solve this errors: ================================================================== = Multi Theft Auto: San Andreas v1.5.2 ================================================================== = Server name : || Romania RolePlay - PlayHard || [Mentenanta] = Server IP address: 46.102.116.24 = Server port : 22003 = = Log file : ..service5057/mods/deathmatch/logs/server.log = Maximum players : 30 = HTTP port : 22003 = Voice Chat : Disabled = Bandwidth saving : Maximum with lightweight sync rate of 1500ms ================================================================== [2017-06-17 16:55:15] ERROR: Couldn't find file skins/csher.txd for resource changeme [2017-06-17 16:55:15] Loading of resource 'changeme' failed [2017-06-17 16:55:15] ERROR: Couldn't find script s_marker.lua for resource job-system-trucker [2017-06-17 16:55:15] Loading of resource 'job-system-trucker' failed [2017-06-17 16:55:15] ERROR: Couldn't find map San Fierro/LSTR.map for resource map-system-old [2017-06-17 16:55:15] Loading of resource 'map-system-old' failed [2017-06-17 16:55:15] Resources: 160 loaded, 0 failed [2017-06-17 16:55:15] MODULE: Loaded "MySQL 5.0 database module" (0.50) by "Alberto Alonso <[email protected]>" [2017-06-17 16:55:15] Starting resources...... [2017-06-17 16:55:15] Server minclientversion is now 1.5.4-9.11354.0 [2017-06-17 16:55:15] INFO: MYSQL ERROR 1146: Table 'codx.maps_names' doesn't exist [2017-06-17 16:55:15] INFO: 0 mape cu 0 obiecte si 0 stergeri din mapa incarcate in 1ms [2017-06-17 16:55:15] Server password cleared [2017-06-17 16:55:15] ERROR: faction-system/s_faction_admin.lua:513: attempt to index local 'maxrow' (a nil value) [2017-06-17 16:55:15] Please wait... [2017-06-17 16:55:15] INFO: MYSQL ERROR 1146: Table 'codx.blips' doesn't exist [2017-06-17 16:55:15] INFO: 0 blipuri incarcate in 2ms [2017-06-17 16:55:15] SCRIPT ERROR: interior-system/blips_s.lua:1: unexpected symbol near '\' [2017-06-17 16:55:15] ERROR: Loading script failed: interior-system/blips_s.lua:1: unexpected symbol near '\' [2017-06-17 16:55:15] ERROR: Couldn't find resource language-system. Check it exists. [2017-06-17 16:55:15] INFO: MYSQL ERROR 1146: Table 'codx.clothes_pos' doesn't exist [2017-06-17 16:55:16] ERROR: Couldn't find resource job-system-trucker. Check it exists. [2017-06-17 16:55:16] INFO: Loaded 0 pilot licenses in 2ms. [2017-06-17 16:55:16] INFO: MYSQL ERROR 1146: Table 'codx.tagging' doesn't exist [2017-06-17 16:55:16] WARNING: vehicle-system/s_entry.lua [Server] is encoded in ANSI instead of UTF-8. Please convert your file to UTF-8. [2017-06-17 16:55:16] Some files in 'vehicle-system' use deprecated functions. [2017-06-17 16:55:16] Use the 'upgrade' command to perform a basic upgrade of resources. [2017-06-17 16:55:16] WARNING: Script 'vehicle-system/s_entry.lua' is not encoded in UTF-8. Loading as ANSI... [2017-06-17 16:55:16] SCRIPT ERROR: vehicle-system/s_entry.lua:1: unexpected symbol near '?' [2017-06-17 16:55:16] ERROR: Loading script failed: vehicle-system/s_entry.lua:1: unexpected symbol near '?' [2017-06-17 16:55:16] WARNING: File 'typing_icons/Brazil.png' in resource 'donators' is invalid. [2017-06-17 16:55:16] WARNING: File 'typing_icons/Bulgaria.png' in resource 'donators' is invalid. [2017-06-17 16:55:16] WARNING: carshop-system/s_crusher.lua:3: Bad argument @ 'createColCuboid' [Expected vector3 at argument 1, got none] [2017-06-17 16:55:16] WARNING: carshop-system/s_crusher.lua:17: Bad argument @ 'addEventHandler' [Expected element at argument 2, got boolean] [2017-06-17 16:55:16] WARNING: carshop-system/s_crusher.lua:69: Bad argument @ 'addEventHandler' [Expected element at argument 2, got boolean] [2017-06-17 16:55:17] ERROR: Couldn't find resource resource-keeper. Check it exists. [2017-06-17 16:55:17] Server started and is ready to accept connections! [2017-06-17 16:55:17] To stop the server, type 'shutdown' or press Ctrl-C [2017-06-17 16:55:17] Type 'help' for a list of commands. [2017-06-17 16:55:18] Querying MTA master server... success! (Auto detected IP:46.102.116.24) [2017-06-17 16:55:18] WARNING: global/s_account_globals.lua:43: getUserNameFromID(): Unable [2017-06-17 16:55:18] WARNING: global/s_account_globals.lua:43: getUserNameFromID(): Unable [DUP x6] [2017-06-17 16:55:18] ERROR: vehicle-system/s_vehicle_system.lua:283: cannot resume dead coroutine [string "?"] [2017-06-17 16:55:19] ERROR: vehicle-system/s_vehicle_system.lua:283: cannot resume dead coroutine [string "?"] [DUP x2] [2017-06-17 16:55:19] ERROR: ped-system/s_peds.lua:39: cannot resume dead coroutine [string "?"] [2017-06-17 16:55:19] ERROR: ped-system/s_peds.lua:39: cannot resume dead coroutine [string "?"] [DUP x6] [2017-06-17 16:55:19] ERROR: vehicle-system/s_vehicle_system.lua:283: cannot resume dead coroutine [string "?"] [2017-06-17 16:55:20] ERROR: vehicle-system/s_vehicle_system.lua:283: cannot resume dead coroutine [string "?"] [DUP x2] [2017-06-17 16:55:20] ERROR: ped-system/s_peds.lua:39: cannot resume dead coroutine [string "?"] [2017-06-17 16:55:20] ERROR: ped-system/s_peds.lua:39: cannot resume dead coroutine [string "?"] [DUP x6] [2017-06-17 16:55:20] ERROR: vehicle-system/s_vehicle_system.lua:283: cannot resume dead coroutine [string "?"] [2017-06-17 16:55:21] ERROR: vehicle-system/s_vehicle_system.lua:283: cannot resume dead coroutine [string "?"] [DUP x2] [2017-06-17 16:55:21] ERROR: ped-system/s_peds.lua:39: cannot resume dead coroutine [string "?"] [2017-06-17 16:55:27] ERROR: ped-system/s_peds.lua:39: cannot resume dead coroutine [string "?"] [DUP x6]
    1 point
  12. addictional content =/= additional content, I thought you were on about drugs and stuff.. Pretty sure there are fully functional resources like this, you don't need to re-invent the wheel. Take a look at this: https://community.multitheftauto.com/index.php?p=resources&s=details&id=11265
    1 point
  13. تسلملي حبيب قلبي الخلفيه مؤقته الى ان في شمص معين بيصمملنا الخلفيه +تسلم على الرد الجميل اسعدني مرورك
    1 point
  14. minValue + scrollbarPosition * (maxValue - minValue) where minValue would be 150 and maxValue 250, you would get something like
    1 point
  15. Here's an example: local x, y, z = getElementPosition(TruckVehiclesTable[truckElement]) trailer = createVehicle(515, x, y, z) attachTrailerToVehicle(TruckVehiclesTable[truckElement], trailer) I suggest you also put created trailer into a table so you can easily delete it.
    1 point
  16. افضل شئ انك مسويه بنفسك وهذا شي يعجبني انك ما تحب الجاهز وتسوي بنفسك ولو بتتعلم من البداية صراحة التطوير جميل جداً لكن اللون الاسود خله شي غير + الخط خله مثلاً اريال او شي غير ... بس صراحة تطوير رائع جداً بالتوفيق يا ماستر .. انا شبه معتزل المنتدى وآسف على الرد المتأخر
    1 point
  17. He understood you, you don't understand him. Please refer to this post:
    1 point
  18. The reason you cannot destroy the blip that's attached to the destination marker is that that blip is defined as local in another function, simply remove local and you'll be able to delete it. Similar goes for the marker, if you want it spawned once the truck is spawned, simply make the marker spawn once that function is triggered, here's an example: startdelmark = createMarker( 211.39999389648, 1809.5, 16.60000038147, "cylinder", 3, 42, 214, 153, 100 ) --spawns truck from here. local myBlip = createBlipAttachedTo ( startdelmark, 51 ) --blip on the spawn marker. delivmark = nil local deliverBlip = nil TruckVehiclesTable = {} function spawntruck (truckElement) if ( isElement(truckElement) and getElementType(truckElement) == 'player' ) then local truckVeh = getPedOccupiedVehicle(truckElement) local x, y, z = getElementPosition (truckElement) local rotX, rotY, rotZ = getElementRotation (truckElement) TruckVehiclesTable[truckElement] = createVehicle (515, x-5, y, z+2) setElementRotation (TruckVehiclesTable[truckElement], rotX, rotY, 90) warpPedIntoVehicle (truckElement, TruckVehiclesTable[truckElement]) delivmark = createMarker(-1355.6999511719, -506.20001220703, 13.10000038147, "cylinder", 3, 42, 214, 153, 100) --this is the location. deliverBlip = createBlipAttachedTo ( delivmark, 52 ) --the blip I want on the destination marker. setBlipSize ( myBlip, 1 ) outputChatBox ("You have took on the role of goods courier, deliver the goods to the dollar blip to get your reward", truckElement, 0, 255, 0) outputChatBox ("Do NOT leave the vehicle or it will be destroyed and your mission will fail!", truckElement, 255, 0, 0) end end addEventHandler("onMarkerHit", startdelmark, spawntruck) You'll need to be more detailed about your last question, in what table are the trailers, how do you want them to spawn etc. Hope I helped.
    1 point
  19. 'onPlayerLogin'--اول ما الاعب يسجل createVehicle--يصنع سيارة warpPedIntoVehicle--ينقل الاعب للسيارة toggleAllControls--تشيل كل الكونترولس من الاعب بحيث انه ما يقدر ينزل --عشان تخلي السيرة تمشي استخدم setTimer or createMarker--الافضل تسخدم صنع الماركر لآنه اسهل 'onMarkerHit'--اذا اخترت صنع الماركر تستخدم setControlState--بعد ما الاعب يروح الماركر او لو اخترت تايمر بس يبدا التايمر حط له كنترول --setControlState(source, ""accelerate", true) مثال يخلي المركبة تمشي
    1 point
  20. It sounds very interesting. Cant wait to see.
    1 point
  21. اولا يكون عندك خلفييه في php يقلبي تاخذلك موقع مجاني ثم تركب عليه mta sdk php ثم تسوي من السيرفر كول ريموت callRemote للصفحه حقة php ثم تسوي اتصال من ال php الى الافتيبي اللي تبي ترفع عليه وكان الله يحب المحسنين هذي طريقتي واشوفها اضمن من انك تسوي اتصال مباشر مع ftp الخادم
    1 point
  22. http://businessliferp.com/ @Killer Project @#_iMr.[E]coo @F_F @Dr.Marco @#Soking اكمل على هالمنوال تعبت والله جلست الصباح كامل عشان احصل خلفية تستحق وجلست اسوي القايمه بعد يوم تقريبا من تعلم الجافا كويري على العموم لا تحطمو امالي راعوني انا ما احب الجاهز عشان كذا احب اسوي بنفسي اراكم بدون تحطيم مره +_+
    1 point
  23. 1 point
  24. Hello community ,, today i decided to make a simple tutorial for MTA beginner scripters i hope that this tutorial help them to start their scripting life. Okay first of all i recommend all beginners to start learning the basic of LUA and try to understand every basic thing then start to learn much harder things. Basic tutorial to start with :- -------------------------------------- 1 ) What is Programming ? ( Not recommended but you have to know what is programming ) 2 ) The Editor. ( Tools you can use when scripting. ) 3 ) Variables in LUA. ( 100% Recommended ) 4 ) LUA – Mathematics ( Recommended but not now ! you will use it later when jumping from beginner level. ) 5 ) Comments - Keywords ( Just read. ) 6 ) Operations of Comparison / Logical Operations( 50% Recommended ) 7 ) Chunks / Blocks ( Must read !! 100% Recommended ) 8 ) Strings ( Read this later ) 9 ) Loops ( Must read !! 100% Recommended. ) 10 ) Conditional Structures ( Must read carefully !! ) 11 ) Tables ( Very useful in MTA LUA Scripting. Must read !! ) 12 ) Functions ( Totally recommended. i call this god of LUA. MUST READ !! ) ______________________________________________________________________________________________________________ MTA LUA Basic scripting _______________________ Questions and Answers :- --------------------------------- 1) Who is you fellow scripter that can help you with any function you forgot ? - MTA Wiki is ! 2 ) Program to use in writing MTA LUA in an easier way ? - MTA Script editor is. 3 ) Why i have to use MTA Script editor ? - It will help u to script in an easier way as it have auto complete function name feature. 4 ) Can i add more than one event for one function ? - Yes you can. 5 ) How to protect my scripts from hackers ? - you can use MTA compiler or use exports. 6 ) How to export ? - [TUT] How to export << This TUT will help ! 7 ) What is the difference between commands and events ? - Command will call the function when the player write the command but event will call the function when the player do something. ----------------------------------------------------------------------------------------------------------------------------------------------------------------- MTA Basic scripts ( Read Comments ) ---------------------------------------------------- 1 ) Creating a useful event. ourMarker = createMarker(x, y, z,"cylinder",2,0,150,255,255) -- Created a marker called ourMarker. dont forget to replace x, y, z with you co-ordinates function tutorial () -- creating a function called tutorial -- add function bodies here ( what the marker do when the player hits the marker ? ) end -- to end the function. addEventHandler ( "onMarkerHit", ourMarker, tutorial ) -- translate : when the player hit ourMarker call tutorial function. onMarkerHit is the Event. you know more about Events at MTA Wiki 2 ) Creating a useful command. function tutorial () --Created a function called tutorial -- add function bodies here ( what the function do when thePlayer write the Command ) end -- to end the function. addCommandHandler ( "CommandHere", tutorial ) -- translate : when the player write the command /CommandName it will call tutorial function. CommandHere is the Command. ----------------------------------------------------------------------------------------------------------------------------------------------------------------- Some useful scripts :- --------------------------- How to create a moving gate ? Tools we need : 1) x,y,z of the gate. 2) x,y,z of the gate after moving. 3) time in mili seconds in which the gate will open. 4) colshape to open the gate when the player hit the colshape. ( you can also use marker ) 5) onColShapeHit Event. ( you can also use onMarkerHit ) 6) onColShapeLeave Event. ourGate = createObject (objectIDOrTheGateID, x, y, z, rX, rY, rZ) -- change x,y,z to the gate co-ordinates, change rX,rY,rZ to the gate rotation co-ordinates. and for sure change objectIDOrTheGateID to the gate ID. ourColShape = createColCircle (x, y, z) -- change x,y,z to the x,y,z of the ColCirle function opendagate() moveObject (ourGate, timeInMiliSeconds, x, y, z) -- change x,y,z to co-ordinates of the gate after moving. and timeInMili seconds to time which the gate will open. for ex: 1000 : the gate will open after a second when the player hit the colShape. end addEventHandler("onColShapeHit", ourColShape, opendagate) function closedagate() moveObject (ourGate, timeInMiliSeconds, x, y, z) -- change x,y,z to co-ordinates of the gate normal position of the gate to close it. and timeInMili seconds to time which the gate will close. for ex: 1000 : the gate will close after a second when the player leave the colShape. end addEventHandler("onColShapeLeave", ourColShape, closedagate) Will add more useful scripts in the next topic update .. ______________________________________________________________________________________________________________ Thanks for reading and i hope all enjoyed.
    1 point
  25. As of 09/03/2017 we've pruned the entire section, as we felt some sort of rules and guidelines were needed in order to achieve a good listing for both server staff and interested parties. Rules: - General forum guide of conduct and rules apply in this section. - Any modification which is outside limits for the OP shall be reported via the report system in order to be addressed by a moderator. This is mandatory, as the goal is to keep this section as clean as possible. - Topics must have a detailed description of your server, this involves a brief description of your community, gamemodes you're offering and anything else that helps players to get interested on you. - Drama, server bashing, staff bashing, won't be allowed by any means. Members found guilty of these behaviour will be punished accordingly to our general guidelines and more severe depeding of staff judgement. - You should be atleast a staff member (or owner) of the server you're advertising (so no promotion by 'satisfied players'). - It's not allowed to actively recruit or persuade people to leave a positive opinion on your topic. Moderators reserve the right to judge if a spree of posts is suspicious (likely to be a result of this practise) and remove it on their own discretion, this is non-negotiable. Formatting your topic: - Topic titles shall have the form [SERVER TYPE] Brief description/Name [LANGUAGE]. - The first post shall be written in at least 3 parts, being the first a brief description of yourself, the second any media you may provide about your server, mostly ingame shots and anything you might want to show to interested players, and the third one server details, this involves connection details, contact details, and anything else you may provide to get players to your community. Any thread not following this guidelines shall be deleted and the user/s involved been given a warning depending of the staff judgement.
    1 point
  26. I've written a Node.js module to facilitate calling http exported functions. It's just a class with one function, 'call'. It was originally part of my web panel project for MTA, but I've decided to release it as a module. It's published on npm, so it's easy to install with: npm install mtasa-sdk Example: var MTA = require('mtasa-sdk'); var server = new MTA(); // [url=http://localhost:22005]http://localhost:22005[/url] server.call(resourceName, functionName, args, callback); For more information, check the GitHub repo: http://github.com/jr10/node-mtasa-sdk
    1 point
×
×
  • Create New...