Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/09/17 in all areas

  1. Hello @Mendozite . The whole thing is about will and energy. The more you willing to learn it and the more energy you put in it, the better you get. I wouldn't call myself a really professional scripter, but I can say I'm quite good. I started scripting MTA 3 years ago, it was like chinese, I didn't understand a single word. Put energy in it and become able to make some simple scripts, but I gave at at a point. Luckily 1 year after that, some of my friends wanted me to make a mod for him, so we started a project. It was 3 months 'til I got from Knowing nothing, to be able to make complex, whole mods. The point is, you have to put energy in it, you have to be willing to learn it, and it can help if you set goals you want to reach. If you're scripts don't have a point, you won't learn a thing. Use MTA WIKI, read the functions. Using wiki isn't bad, it doesn't mean you're not good. It means that you're good, beacuse you know where to look for the solution. When I work, wiki is opened the whole time. Also maths is quite important for it. Almost every cool script has a lots of math in it.
    2 points
  2. just add this after if #playercar > 0 then setElementData(client,"mycar1 - > Spawned",true) then replace this: if not (isPedInVehicle(client)) then to this: if not (isPedInVehicle(client)) and not getElementData(client,"mycar1 -> Spawned") == true then when you destroy: removeElementData(client,"mycar1 -> Spawned") or setElementData(client,"mycar1 - > Spawned",false)
    1 point
  3. السلام عليكم ورحمة الله وبركاته الكود ذا ما ابي اعتبره يوزفل فنكشن كامل لأن فيه مشكله وهي لازم تسوي لكل قيمه ملف خاص بها طيب وش فائدتها ؟ حفظ شي معين عند اللاعب مثلاً عن طريق xml كلمه سر اللاعب او اسم حسابه الخ السورس كود ما ضفته في اليوزفل فنكشن لأن ما اعتقد له فائده وهو مب كامل function xmlSetText ( xmlFileName, columnName, childText ) if tostring ( xmlFileName ) and xmlFileName ~= "" and tostring ( columnName ) and columnName ~= "" and tostring ( childText ) and childText ~= "" then local XML = xmlCreateFile ( tostring( xmlFileName ) .. ".xml" , "xmlColumns" ) xmlNodeSetValue ( xmlCreateChild ( XML , tostring ( columnName ) ), tostring ( childText ) ) xmlSaveFile ( XML ) else outputChatBox ( "xmlSetText ( string xmlFileName, string columnName, string text )" ) end end function xmlGetText ( xmlFileName, columnName ) if tostring ( xmlFileName ) and xmlFileName ~= "" and tostring ( columnName ) and columnName ~= "" and xmlLoadFile ( tostring ( xmlFileName ) ..".xml" ) and xmlFindChild( xmlLoadFile ( tostring ( xmlFileName ) ..".xml" ), tostring ( columnName ), 0 ) then return tostring ( xmlNodeGetValue ( xmlFindChild ( xmlLoadFile ( tostring ( xmlFileName ) ..".xml" ), tostring ( columnName ), 0 ) ) ) or "nil" else outputChatBox ( "xmlGetText ( string xmlFileName, string columnName )" ) return "error" end end التركيبه xmlSetText ( string xmlFileName, string columnName, string yourText ) xmlGetText ( string xmlFileName, string columnName ) --[[ xmlFileName -- اسم الملف columnName -- اسم الكولمن yourText -- القيمه اللي تبيها --]] مثال -- Client button = guiCreateButton ( ...., "save my name" ) button2 = guiCreateButton ( ...., "set my name" ) function c () if source == button then xmlSetText ( "xmlFileName", "columnName", getPlayerName ( localPlayer ) ) elseif source == button2 then name = xmlGetText ( "xmlFileName", "columnName" ) triggerServerEvent ( "setname", localPlayer, name ) end end addEventHandler ( "onClientGUIClick", root, c ) -- Server function t ( name ) setPlayerName ( client, tostring ( name ) ) end addEvent ( "setname", true ) addEventHandler ( "setname", root, t ) نفس الكلمه حقت المره اللي فاتت ... كل هاذي تجارب بس والهدف التعلم بس على العموم ان شاء الله بشرح شرح مهم بعد فتره اغلب المبرمجين ما يلاحظونه
    1 point
  4. الف الف الف شكر لكم اخواني مشكورين كلكم فهمتها الحمدلله
    1 point
  5. Do the same what Dutchman suggested. Whitelist the stuff.
    1 point
  6. Indeed you can't nest comment tags. I love to comment things and leave them like that until I need them, so I often run in to the nesting problem while adding more comments for multiple lines. Yet after a while the problem becomes almost a habit, so keep commenting more! more! more! Or just use: ctrl + Q(Notepad++) which will add only line comments for the selected lines. (instead of --[[ ]] it will only add --)
    1 point
  7. انا بشرحلك لكل حدث يوجد بارمنترات والبارمنترات توضع داخل ال function بارمنترات حدث موت الاعب int totalAmmo, element killer, int killerWeapon, int bodypart, bool stealth int total Ammo = عدد الطلقات element killer = القاتل int killerWeapon = سلاح القتل bodypart = مكان القتل يعني الجزر من الجسم مثل الرأس او الرجل bool stealth = ما فهمتها ض المهم هم مرتبات ما تقدر تضع killerWeapon قبل totalAmmo لما تبي تسوي تحقق ليش لازم تكتب يلي قبله ايضا مثل انت تبي ال bodypart ما تقدر تكتب كذا function(boypart) لازم function(_,_,_,boypart) طبعا ما شرط تضع ال _ تقدر تكتب اي شيئ بس الاغلب يضعونها للاختصار اتمنى فهمتني
    1 point
  8. function setPedClothes(thePed, clothingSlot, clothingID) if not isElement(thePed) or type(clothingSlot) ~= "number" then error("Invalid arguments to setPedClothes()!", 2) end if not clothingID then return removePedClothes(thePed, clothingSlot) end local hasClothes = getPedClothes(thePed, clothingSlot) if hasClothes then removePedClothes(thePed, clothingSlot) end local texture, model = getClothesByTypeIndex(clothingSlot, clothingID) return addPedClothes(thePed, texture, model, clothingSlot) end function roupat () if (getPlayerMoney(source) >= 10) then takePlayerMoney(source, 10) setPedClothes(source, 0, 11) end end addEvent("roupa1", true) addEventHandler("roupa1", root, roupat)
    1 point
  9. I don't understand this What do you mean?
    1 point
  10. Huh, you can't use the takePlayerMoney with root as arg 1 This function is serversided ? Could you provide the entire code ? EDIT : setPedClothes is a useful function, have you added it ?
    1 point
  11. شوف هذا المثال -- Server Side addEventHandler ( 'onPlayerLogin' , root , function ( ) setElementData ( source , 'uAccount_' , getAccountName ( getPlayerAccount ( source ) ) ) end ) -- Client guiSetText ( uLabel_ , getElementData ( localPlayer , 'uAccount_' ) )
    1 point
  12. Well. People have a bad habit of hurting others. Think about it. A community where the staff is so hateful, is a really bad community. I recomnend you to leave that community and the forum behind you and don't let those b***ards drive you crazy. If you feel bad or threatend, leave. For yourself.
    1 point
  13. صصراحه شغل جيد وبكذب عليك لو قلت غير كذا لكن بكون صريح معك انت الحين ما سويت شي جديد كل اللي سويته تقليد ل محاربين الززمبي تمام انا بكون مبهور فعلا لو سويتلك شي جديد ليش ما نطور احنا العرب ليه نقلد فقط؟ عطني سبب واحد صحيح ان اللي سويته يعتبر تطور لكن شي قد عفا عليه الزمن شفلك شي افضل ممن ذول سوه بتقلي صورة للبروفايل ؟ وبعدين؟ هل البشر كلها تلعب زومبي انت ما سويت شي الا لفئه بسيطه لذلك انصحك كنصيحه اخويه والله لا اكثر ولا اقل حرام تضيع خبرتك ذي ووقتك ذا بموضه قديمه شفلك شي فكره جديده ما طلعت على بال احد وان فكر احد يسويها فتكون صعبه عليه مره لدرجة انه يستسلم عشان تترك اثر وين ما كنت تقول انا كنت هنا عرفت كيف على العموم شغل نظيف لكن خذ بنصيحتي اللي فوق^^^
    1 point
  14. بس ترا حنا مسوينها بفكرة أفضل يعني انت تحط صورة لبروفايلك من المنتدى وتنحفظ لك بالسيرفر
    1 point
  15. يا حرامي ولك وجه تعترف بعد يب ترا فكرة صورة البروفايل فيه سيرفرات كثير مسويتها قبلك, سيرفر الكلان حقي مسويها
    1 point
  16. msyh.ttf is very big and has bad effect in render target. If you want this font, use dxCreateFont. You can use absolute column before add row. dgsDxGridListSetColumnRelative(gridlist,false) Or you can use no render target mode. dgsDxGUISetProperty(gridlist,"mode",true)
    1 point
  17. addEventHandler("onClientGUIClick", guiRoot, function() local getGui = guiGetVisible(Ventana2) if source == BOTON then if getGui then guiSetVisible(Ventana2, false) showCursor(false) Marker1 = createMarker(2482.2924804688, 1917.4254150391, 9.768750190735,"cylinder",2,0,218,255) addEventHandler( "onClientMarkerHit", Marker1, Inicio ) end end end end ) function Inicio (element) if element == localPlayer then if timer then killTimer(timer) timer = nil end timer = setTimer(create_marker, 3000, 1) end end function create_marker() destroyElement ( Marker1 ) Marker1 = nil Marker2 = createMarker(2482.2924804688, 1917.4254150391, 9.768750190735,"cylinder",2,0,218,255) timer = nil end
    1 point
  18. I couldn't see the source of the problem, but that is a forum. You can leave it if you feel bad while there.
    1 point
  19. Your player parameter is undefined, get the player from the value when looping function setDataOnResourceStart() for i, v in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(v)),aclGetGroup("FoAdmin")) then setElementData(v, "showImage", true) end end end addEventHandler("onResourceStart", resourceRoot, setDataOnResourceStart)
    1 point
  20. Oh, an unexpected plot twist! If what you say there is true, then you need to reset your priorities. Bullying and blackmail are serious offences in most countries, you should adress this to a teacher or your parents as soon as possible and ask for help.
    1 point
  21. وأنت بخير , زمان عنك !
    1 point
  22. 1 point
  23. Please make sure you follow the section rules (https://forum.multitheftauto.com/topic/93567-rules-and-formatting-for-this-section/) @Gengar
    1 point
  24. I've been involved with computers and programming since as long as I can remember - I was making my first :~ty HTML sites at the age of 7. You can spend months, even years learning a single programming language; but one thing that really broadened my entire understanding of computing / programming was a computer science class that I took during my high school years. Computer Science takes you back to the basics, it teaches you the standards / logic used throughout pretty much all programming languages. From variables to functions, arrays to expressions - even taking the time to learn the difference between different data types, such as strings, floating points, integers and booleans - that'll make a huge difference to your general understanding of programming. Just because you can put bits of code together and run it successfully doesn't make you a good or professional scripter. It's something that I see often on this forum in-fact. What makes you a good programmer is knowing exactly what your code does, and how to debug & fix your code as soon as a problem arises. This also means that being great in a certain programming language isn't all it takes - you need a good, logical brain too. Being able to come up with fresh & creative ways on how to achieve your "goals", and thoroughly thinking through your ideas. I'd suggest you start with something like this https://en.wikiversity.org/wiki/Introduction_to_Computer_Science Once you're confident with that, w3schools is a great website to start writing your first bits of code. Check out their HTML and Javascript tutorials (which includes their "Try it yourself" code editor in each example!) Good luck.
    1 point
  25. Sua dúvida é referente a como fazer um script. Da próxima vez, poste na área de Script do fórum. Voltando a sua dúvida, você deverá criar um Team toda vez que o seu resource for iniciado. Se vc ler um pouco a Wiki, vai encontrar algo sobre Team e como criá-los via script. Exemplo da Wiki - createTeam: function createAdminTeamOnStart () AdminTeam = createTeam ( "Admin", 0, 255, 0 )-- create a new team and name it 'Admin' end addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) O exemplo acima irá criar automaticamente um time chamado Admin na cor verde quando seu resource for iniciado. Para colocar o player automaticamente nesse Team toda vez que ele começar a trabalhar, dai seria necessário saber como está programado seu script. Você deverá usar isso: SetPlayerTeam. E para removê-lo do Team, coloque nil no lugar do Team. Espero ter ajudado. Boa sorte.
    1 point
  26. Not good format. The correct format is: <export function="addLog" type="server" /> <export function="saveLog" type="server" /> <export function="createLog" type="server" />
    1 point
  27. Thanks. The problem is a compatibility issue with GAS Tech G-Buster Browser Defense Only current solution is to uninstall it. Instructions at item 7: http://www.dieboldnixdorf.com.br/faq
    1 point
  28. سوي تايمر وحط الارقمنت الاخير 1 عشان م يتكرر ..
    1 point
  29. ودي والله , لكني حاذف اللعبة من فترة
    0 points
  30. Its simple for you.. But i again dont understand how to use in my code.. When you put in my code its easy learn..
    0 points
  31. 0 points
  32. Thank you a lot, but I still facing another problem which that there is a second matter. But, it will be pointless if I say it here since it's related to a specific MTA server. Could you take a look of this topic: I'm feeling very bad in real life and I can't control myself, even my hands were trembling all the time because of the confusion. Hopefully, you assist me of what I should do there since I did really do something bad intentionally, I just did that because I got threatened. Here is the truth of everything: https://pastebin.com/rWjsr8x7. Well, you're going to say: Sorry, but we can't force a X staff accept your ban appeal or something like that, but the administrator (The owner of the server) doesn't know why did I do that and I swear that I was just scared of them and I haven't at that time a solution except doing that action. I hope you assist me with choosing the right choice because I really need to back to that community.
    0 points
×
×
  • Create New...