Leaderboard
Popular Content
Showing content with the highest reputation on 20/06/17 in all areas
-
2 points
-
2 points
-
function hasPlayerLotteryTicket(player) local hasTicket = false for k, v in ipairs(LOT_TICKETS) do local tPlr = v[1] local tNum = v[2] if isElement(tPlr) and player == tPlr then outputChatBox("You already bought a ticket, your number is: " .. tNum, player ) hasTicket = true break end end return hasTicket end Add the above code to your script and change line 162 to this: if LOT_ON and not hasPlayerLotteryTicket(me) then That should do it, although I haven't tested it myself, if it's not working correctly, use /debugscript 3 and come back with the error. Explanation: There's a table called LOT_TICKETS which stores all the tickets that are currently owned by players. Every single 'row' of this table is another, nested table, which looks like this: LOT_TICKETS = { {"player1", 10}, {"player2", 87}, {"player3", 55}, } "player1", "player2", "player3" are actually not strings, but userdata values which point to a player element, so if you loop through the table and check them one by one, you will be able to check it against the source element of the /ticket command2 points
-
You should use setElementPosition function instead setElementInterior. Because if you already in interior number 2 the function won't work ( returns false ). So use setElementPosition.2 points
-
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:1 point
-
'Alpha' J Series is completely custom open world sandbox server based around my extended development of Gostown; Within this server you can find a huge completely custom map called Gostown, 2 islands, one has a city atop a mountain that scales taller then mt.chilland and has much geographical features such as forests, slopes, cliffs, and plenty more. On the other island sits an old world war style airport with a quarry and a decent sized city right down the road. -------- Currently, the game mode mostly revolves around racing with a completely new type of tune shop the likes of which has never been seen before in MTA, with many features, with the ability to tune near every aspect of your vehicle, this is a racers, tuners, ricers, drifters, etc delight. The map - Media : Server Stats : http://104.233.101.128/serverwebsite/ Server IP: mtasa://104.233.101.128:22003 Side note - Server may not perform well under very low spec computers, however, we offer options to try to improve your frame rate.1 point
-
السلام عليكم ورحمة الله تعالى وبركاته ، اليوم جبت لكم طريقة بسيطة أغلب المبرمجين المحترفين يستعملونها ، مثلا موداتك يوم تنزل على جهاز اللاعب ، يجي الكلينت بس ، وحنا في درسنا اليوم بنتعلم كيف نحميه # طبعا الطريقة مب حقتي بس حابب أشاركها :> أول شي نحط الملفات في جدول : dxLibFiles = { "dxButton.lua", "dxWindow.lua", "dxEditBox.lua", "dxMain.lua" } تمام ، هذولي هم الملفات اللي حابين نحميها بعدها نجي نسوي فنكشن ونسوي فيه لوب لجميع ملفات الجدول ، تم نحذفهم في وس اللوب ، ثم نجيبهم من جديد function SecureFiles() for i=0, #dxLibFiles do fileDelete(dxLibFiles[i]) local files = fileCreate(dxLibFiles[i]) if files then fileWrite(files, "تحياتي ، Skype : Conolel44") fileClose(files) end end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), SecureFiles) أتمنى الدرس يكون فادكم و ، يكون خفيف ظريف هههه في أمان الله1 point
-
function AdminCarRemoval ( button, state, player ) if ( button == "left" and state == "down" ) then if ( isElement(source) ) and ( getElementType(source) == "vehicle" ) then if ( isGuestAccount(getPlayerAccount(player)) ) then return end if ( aclGetGroup ( "Admin" ) ) and ( isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(player)), aclGetGroup ( "Admin" ) ) ) then destroyElement (source) outputChatBox('Successfully destroyed the vehicle.',player,255,255,0,true) end end end end addEventHandler( "onElementClicked", getRootElement( ), AdminCarRemoval ) Make sure the first letter of the group name must be capital. ( usually its capital letter )1 point
-
But how would players being inside see the players that are outside? If they are in different dimensions.1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
اولا يكون عندك خلفييه في php يقلبي تاخذلك موقع مجاني ثم تركب عليه mta sdk php ثم تسوي من السيرفر كول ريموت callRemote للصفحه حقة php ثم تسوي اتصال من ال php الى الافتيبي اللي تبي ترفع عليه وكان الله يحب المحسنين هذي طريقتي واشوفها اضمن من انك تسوي اتصال مباشر مع ftp الخادم1 point
-
1 point
-
1 point
-
كخبير في اللغة اللون متناسق لون النص : ممتاز ربطك للسيرفر للموقع بالقاعدة : ممتاز القوائم : ممتازة ستايل : ممتاز طرق التواصل : جيدة الموسيقى : https://e.top4top.net/m_536ar2qh1.mp3 - جيدة نوعا ما الاتصال الامن : غير آمن @Master_MTA1 point
-
1 point
-
1 point
-
حبيب قلبي انا خافي الصوت عن قصد بحيث انه يكون خلفيه للموقع مشكور على الرد+_+1 point
-
http://businessliferp.com/ @Killer Project @#_iMr.[E]coo @F_F @Dr.Marco @#Soking اكمل على هالمنوال تعبت والله جلست الصباح كامل عشان احصل خلفية تستحق وجلست اسوي القايمه بعد يوم تقريبا من تعلم الجافا كويري على العموم لا تحطمو امالي راعوني انا ما احب الجاهز عشان كذا احب اسوي بنفسي اراكم بدون تحطيم مره +_+1 point
-
@CharlySHOMAN, просто это займет память, на процессор существенной нагрузки не будет, возможно что обращения к таблице будут тяжелы, насколько, и сколько памяти, зависит от объема и структуры загружаемых таблиц.1 point
-
1 point
-
Just read the wiki: So instead of using one number for the scale, use two. Couldn't be easier.1 point
-
1 point
-
1 point
-
1 point