Leaderboard
Popular Content
Showing content with the highest reputation on 23/01/17 in all areas
-
2 points
-
Hello, I apologize in advance for my poor English. I'll start from the beginning. For a long time now I own one of the biggest servers RPG in my country. Unfortunately, as long we struggle with shutdown the server. Error with kernel: Jan 18 9:01:14 p.m. sbg1 kernel: mta-server [31998]: segfault at 9 ip 00000000f6b568d5 sp 00000000f33f7a40 error 4 in deathmatch.so [+ f65a8000 876000] Thank you in advance for your help.1 point
-
السلام عليكم ورحمة الله وبركاته حبيت أقدم لكم أول ماب لي ، أتمنى يعجبكم الماب قديم له تقريباً 4 شهور1 point
-
1 point
-
Наверняка, когда вы добавляете обработчкик событий, кнопки еще не существует. Уберите 8-9 и 25-26 строки, или сделайте как ниже.1 point
-
1 point
-
1 point
-
1 point
-
for i, v in ipairs ( xmlNodeGetChildren ( getResourceConfig ( "skins.xml" ) ) ) do local id = xmlNodeGetAttribute(v, "id") local name = xmlNodeGetAttribute(v, "name") local key = xmlNodeGetAttribute(v, "keywords") -- gridlist code here end1 point
-
هو شغال يخوي بس ما يسحب من ال lapel + كل مره اجي اشتري الاقيه بدأ من اول 1 وكمان يعطيني ونا ما معي نقاط @_@1 point
-
xmlLoadFile xmlFindChild xmlNodeGetAttribute guiGridListAddRow guiGridListSetItemText1 point
-
Try this. cars = getElementsByType("vehicle",root,true) for num, car in ipairs(cars) do local carHP = math.floor (getElementHealth(car)) if carHP < 640 then local getTickStart = getTickCount () getTickStart = math.floor(getTickStart / 1000) if math.mod(getTickStart, 2) == 0 then local masina = getPedOccupiedVehicle(getLocalPlayer()) if masina then if masina == car then dxDrawImage( screenWidth - 200, 970,32,37,"images/hud/accident.png") ax = ax - 34 end end end end end1 point
-
قول لـ الاونر يفك الباند حقي انت مشكلتك تجرب المودات فـ السيرفرات اللي انا متبند فيها1 point
-
حاليا بالمحلي ومن المحتمل بعد شوي تشوفه في Q.91 point
-
1 point
-
1 point
-
Yes because you are looping all vehicles that streamed by client. Try this. function createSpeedo() local theVehicle = getPedOccupiedVehicle(getLocalPlayer()) -- Check if the player is in Vehicle, if he is not in any vehicle then it will return false if theVehicle then -- If true (the player is in his Vehicle), this argument will pass this block and execute the code below local carHP = math.floor(getElementHealth(theVehicle) / 10) if carHP < 500 then dxDrawImage( screenWidth - 200, 32,32,37,"images/hud/damage.png") ax = ax - 34 end end end1 point
-
هههه صراحة عجبتني الأفكار, وإن شاء الله ابدأ بالعمل بها, إنتظروني بالسكربت الجديد ... لوحة الشراء وإرسال الطلبات على البريد الإلكتروني لصاحب السيرفر .1 point
-
Here you go. function createSpeedo() cars = getElementsByType("vehicle",root,true) for num, car in ipairs(cars) do local carHP = math.floor(getElementHealth(car) / 10) if carHP < 500 then local theVehicle = getPedOccupiedVehicle(getLocalPlayer()) if theVehicle then dxDrawImage( screenWidth - 200, 32,32,37,"images/hud/damage.png") ax = ax - 34 end end end end Or try this one, it's more simple and more efective. function createSpeedo() local theVehicle = getPedOccupiedVehicle(getLocalPlayer()) -- Check if the player is in Vehicle, if he is not in any vehicle then it will return false if theVehicle then -- If true (the player is in his Vehicle), this argument will pass this block and execute the code below local carHP = math.floor(getElementHealth(theVehicle) / 10) if carHP < 500 then dxDrawImage( screenWidth - 200, 32,32,37,"images/hud/damage.png") ax = ax - 34 end end end1 point
-
1 point
-
Wow, thanks a lot by answering me. I didn't expect this... Keep up your perfect job. Do not worry, I'm not in a hurry. Haste does not match with perfection.1 point
-
function createSpeedo() cars = getElementsByType("vehicle",root,true) for num, car in ipairs(cars) do local carHP = math.floor(getElementHealth(car) / 10) if carHP < 500 then dxDrawImage( screenWidth - 200, 32,32,37,"images/hud/damage.png") ax = ax - 34 end end end1 point
-
شكون حنااااااا !!!!!! لي يجي يربحنا يلطيففففف نمت بلي زادرو ربحونا سنيغال مغبون عليها هيا ليك عمري وعينيا لقد وقعنا ف حب بنت بعد 300 قلب جرحته1 point
-
أعضاؤنا قدموا 1 مساهمة في هذا المنتدى هذا المنتدى يتوفر على 2 عُضو. آخر عُضو مُسجل هو كل زق فمرحباً به. أكبر عدد للأعضاء المتواجدين في هذا المنتدى في نفس الوقت كان 3 بتاريخ الأحد أغسطس 02, 2009 12:00 pm هههههههههههههههههههههه اخر عضو مسجل حاقد عليك صح ياولد -------------------------- بالنسبة لصاحب الموضوع انا مبرمج vb لكن ماراح اتعب نفسي واتعبك الاستضافة مجانية بدون دوماين ماظن بتجيب زوار كتير1 point
-
I have created a Compatibility FAQ on the wiki based on this topic.1 point
-
It took me a second to realise that they weren't your words, and you were quoting someone. Numerical incremental loops (for i = 1, 100 do, while i < 100 do) are generally speaking the fastest. For tables with numerical indexes larger than 100 items, pairs was faster than ipairs, but lower than 100 ipairs was faster. And when it comes to tables with non-perfect keys (strings, not sequential, etc) pairs is the only way to go. @John Smith, you can't really say it's X amount faster without providing context to that answer. How big was the table? Were you running any operations within the loop? As I said in the last paragraph, it all depends on what you're doing. It really comes down to what you're doing. In most other languages, there are arrays, which have numerical indexes and there are lists, which can have non-numerical indexes. Terminology differs between language, but you get what I mean. Each has a different use scenario. However, in Lua, we're given just a table, which can be seen both as a curse and as a blessing. We can use numerical indexes and treat tables like an array, or use non-numerical indexes and treat tables like a list, or we can do both! Personally, I don't usually iterate over tables with non-numerical indexes unless I have to. I prefer to use my tables (with non-numerical indexes) as a lookup, as opposed to something that needs to be iterated over. This guy has no idea what he's talking about. I mean, he says "medium scripter". What the hell is that supposed to mean? He's most likely just read some statistics on a StackOverflow answer and is going around parading his newfound knowledge. This isn't a black and white issue and really depends on what you want to achieve. Yes, incremental loops are faster in every way, but sometimes it can be cleaner to use ipairs/pairs (not having to access the original table's index to lookup, breaking on the first nil pair, etc). http://softwareengineering.stackexchange.com/questions/80084/is-premature-optimization-really-the-root-of-all-evil1 point