Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 17/01/18 in all areas

  1. You did a good job! I told you in the beginning this project has potential! I wish you the best!
    1 point
  2. LOOOL تعريف فنكشن ماله اي لازمة math.abs بس وخلصنا
    1 point
  3. تفضل الفنكشن ذا , يحوله للعدد موجب function ConvertToPositive ( Number ) return math.abs ( Number ) end
    1 point
  4. edit = guiCreateEdit ( .... ) function test () if ( not tonumber ( guiGetText ( edit ) ) ) or ( guiGetText ( edit ) < 0 ) then guiSetText ( edit, "0" ) end end addEventHandler("onClientGUIChanged", edit, test )
    1 point
  5. I've used this animation before, pretty sure it's this one setPedAnimation(elem, "ped", "floor_hit", 1000, false, true, false);
    1 point
  6. That seems like a good idea, just feed the table dynamical. When a relevant ped streams in on the client add it to the table, when it streams out remove it again.
    1 point
  7. With these instructions, I think, if you calculate in client side, you should only calculate peds, which are in the streamed zone. Use an if branching with isElementStreamedIn(), or if you really want to reduce the peds table, you should use "onClientElementStreamedIn" and "onClientElementStreamedOut" events and a table, where you push and remove the peds. Good to know, that if you restart the resource while you have peds already in the srteamed zone, they will not trigger this event, so you need to loop peds table with getElementsByType("ped",root,true), where the last param choose you only the streamed peds, then you can add to the table. Anyway, making AIs in Mta is very interesting, have a good luck with this!
    1 point
  8. You can go to luac.multitheftauto.com and obfuscate the actual script files. People can only steal the client files, though. It's the only thing they download. If someone downloads your server files, then you should focus on securing your server or computer, because they've just hacked you. Just add cache="false" after the client file entry of the meta.xml file: <script src="clientfile.lua" type="client" cache="false"/> That will load the file directly to the RAM, so script stealers can't just go and snatch the client file from the hard drive like every other dumbass does. Also, this disables the addDebugHook function: addDebugHook( "preFunction", onPreFunction, {"addDebugHook"} ) function onPreFunction( sourceResource, functionName, isAllowedByACL, luaFilename, luaLineNumber, ... ) return "skip" end
    1 point
  9. So, just giving a few ideas here, based on what info you gave... Why exactly do you need to loop through all of the peds? Can you break down the table further so the amount you loop through gets smaller? Can you reduce the amount the loops are run, e.g calling the loop less often?
    1 point
  10. local name = client.name:gsub('#%x%x%x%x%x%x','')
    1 point
  11. Because this event can't use detect if the player quit and this player is himself... This event can use to detect other clients quite in client side... With onClientResourceStop () you can do it, if you want to push the local data to serverside, in this case: --- Client side items = {1,2} function saveItems() triggerServerEvent ("listItems", localPlayer, items) end addEventHandler ("onClientResourceStop", resourceRoot, saveItems) Serverside should be good, but I have doubt about get the player name... Anyway, you can read all of these usefull advice in wiki, It's good to use it... You can read also great examples and I'ts always uptodate.
    1 point
  12. @Awang Thank you, Your way is the one i need exactly. @ShayF Thanks for your help, But i guess your code have some issues I remember i used this way once, And i noticed some problems in it like your hp reloaded automatically sometimes when you get hit by another player specially if the other player have a lag or something, or also you.
    1 point
  13. من مواهبي الجميلة قبل ٣ سنين اني وصلت للوحة تحكم هدف هوست الثغرة خطيرة ، قدرت اني اطلع جميع بيانات الزوار وللاسف ماخبرت صاحب الإستضافة
    1 point
  14. lmfao happens all the time gotta love MTA
    1 point
  15. sry it's my fault, update dgs now
    1 point
  16. ولم تنتهي قصة العشق تلك! #
    1 point
  17. This code may help, you will have to modify it to fit your script, however this is a basic layout of how you want it. local x,y,z = getElementPosition(marker) local sx,sy = getScreenFromWorldPosition(x-2,y,z+1) local sw,sh = getScreenFromWorldPosition(x+2,3,z+1)-- 3 will be your text height. addEventHandler('onClientRender',root,function() dxDrawText('Marker Text',sx,sy,sw,sh) end) Hopefully this has helped you, have a nice day.
    1 point
  18. يمديك تحمل المود اللي قمت بصنعه انا يقدر يساعدك راجع التعليق ذا ما بيحتاج شرح بتجيك الاكواد جاهزة حاليا شغال على تطويره وتفعيل نظام الاباء +التعديل لكن مشغول جدا بمذاكرتي للاختبارات النهائية فاعذروني جامعه مب زي الثانوية المود اللي صنعته نفس guieditor بيفيدك باذن الله راجع التعليق اعلاه
    1 point
  19. The other way to use your great idea is to let vehicles become rusty
    1 point
  20. لقد تم إنشاء روم خاص للعرب في الديسكورد
    1 point
  21. Not everyone is so 'good' as you.
    1 point
  22. exports.scoreboard:addScoreboardColumn("Kills") addEventHandler("onPlayerWasted",root,function(ammo,killer) if killer and killer ~= source and getElementType(killer) == "player" then local pKills = getElementData(killer,"Kills") or 0 if pKills then setElementData(killer,"Kills",pKills+1) end end end )
    1 point
×
×
  • Create New...