Jump to content

Leaderboard

Popular Content

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

  1. TUTORIAL/GUIDE NO LONGER MAINTAINED This tutorial is no longer maintained and it's contents may be deprecated or no longer work. I created this tutorial in 2014, when I was very involved with MTA and the community around it. Due to the nature of life, I ended up leaving MTA to focus on more important things (work, family, life, etc). I believe this tutorial has helped a lot of people get into scripting for MTA over the years, and I'm happy I was able to do answer questions and help people get into coding! Hello! Welcome to my MTA PHP SDK tutorial! In this tutorial I'm going to be teaching you guys how to call your MTA server from your web-server, and call your web-server from your mta server. This tutorial may require a small amount of prior PHP knowledge Let's get started! Getting your web server Getting & installing the PHP SDK Great! Now you're ready to actually get started with using the SDK. Setting up an HTTP user Connecting the servers Creating an HTTP responsive resource Calling our function from the web Getting data from mta server Thanks for viewing this. I will be updating the topic later to show how to call the SDK from the server, get inputs, and do returns later, when I get a chance. Please reply with any questions, concerns, or errors.
    1 point
  2. 1 point
  3. Ищем вхождение в слово с помощью string.find Мы узнали какую позицию в строке занимает первое совпадение. Пробелы до и после текста ищем перебирая каждый символ в строке. Если совпадение найдено - отмечаем его. Если найдено еще одно совпадение, но позицию (которую нашли) мы еще не прошли - значит это не искомое слово, присваиваем ему позицию нашего нового пробела. Так ищем то самое слово - отмечаем пробел до и после него. И заменяем. Все делается циклом и строковыми функциями.
    1 point
  4. Then you have to change triggerClientEvent(source,"doki2",source) to triggerClientEvent(root, "doki2", source) in every line.
    1 point
  5. Yo también tenia el mismo problema pero pude solucionarlo bajando las gráficas del gta sa, del mta y haciendo mas espacio en el disco duro.
    1 point
  6. Exports: int getBankID(string bankName/marker bankMarker) --Returns ID of the specified bank. marker getBankMarker(string bankName/int bankID) --Gets bank marker by ID or name. table getBankMarkers() --Returns a table containing all bank markers. marker getBankEntranceMarker(string bankName/int bankID/marker bankMarker) --Gets bank's entrance marker. marker getBankExitMarker(string bankName/int bankID/marker bankMarker) --Gets bank's exit marker. int countBanks() --Returns number of banks. bool/int setBankAccountBalance(string accountName/player playerElement, int/string newbalance [, table SQLData ]) --Sets bank account new balance. Returns new balance is set successfully, false otherwise. bool/int getBankAccountBalance(string accountName/player playerElement [, table SQLData ]) --Gets the specified account balance. bool isPlayerInBank(player playerElement [, int bankID/marker bankMarker ]) --Checks if player is in a bank. table getPlayersInBank(int bankID/marker bankMarker/string bankName) --Returns a table containing players who are in specific bank. marker getPlayerBank(player playerElement) --Gets bank marker in which specified player is standing. bool withdrawPlayerMoney(player playerElement, int amount [, table SQLData ]) --Withdraws money from specific player's account. bool depositPlayerMoney(player playerElement, int amount [, table SQLData ]) --Deposits specified player's specific amount of money. So simply do exports["bank-reloaded"]:getBankAccountBalance(playerElement)
    1 point
  7. -~- المود فكرته رهيبة لكن عندي لك اقتراح لو تخليه يشتري مفجرات يقدر يحطها بالسيارة ويفجرها يعني مو لازم تعطيه سيارة تعطيه متفجرات وبس وهو يدبر سيارة لحاله اتمنى يعجبك اقتراحي -~-
    1 point
  8. For me this company is the Best.you should try their services
    1 point
  9. كفووووووووووووووووو احسن سكربت ليك يا ماستر <3
    1 point
  10. شكل نص اللي بالمنتدي مايستخدمون البرنامج ذا
    1 point
  11. ههههههههههههههه ولا ايه حبيبي يا سوكا <3
    1 point
  12. احلي مود دا ولا ايه ءف ءح
    1 point
  13. You could create a table, assigning IDs to existing object IDs, but in the engine, no.
    1 point
  14. local k = { {1, 3, 4}, {9, 59, 1, 4, 6}, {0, 1, 0, 4, 3}, {{2, 4}, {1, 2, 3, 4}}, {}, 'HI', } print(#k) -- 6 print(#k[1]) -- 3 print(#k[2]) -- 5 print(#k[3]) -- 5 print(#k[4]) -- 2 print(#k[4][1]) -- 2 print(#k[4][2]) -- 4 print(#k[5]) -- 0 print(#k[6]) -- 2
    1 point
  15. MissionsName = { [1] = "value1", [2] = "value2", [3] = "value3", } aValue = 1 -- Number function outputNewValue( ) aValue = MissionsName [ aValue ] -- String outputChatBox ( aValue ) if ( aValue > #MissionsName ) then -- String - Number aValue = 1 else aValue = aValue +1 end end setTimer( outputNewValue , 5000 , 0 )
    1 point
  16. Try this: local sx,sy = guiGetScreenSize() local px,py = 1280,720 local x,y = (sx/px), (sy/py) local width = 235 local healthBarW = ( health / getPedMaxHealth() ) * width dxDrawLine(x*447 - 1, y*615 - 1, x*447 - 1, y*636, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(x*682, y*615 - 1, x*447 - 1, y*615 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(x*447 - 1, y*636, x*682, y*636, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(x*682, y*636, x*682, y*615 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(x*447, y*615, healthBarW, y*21, tocolor(255, 0, 0, 255), false) --health function getPedMaxHealth() assert(isElement(localPlayer) and (getElementType(localPlayer) == "ped" or getElementType(localPlayer) == "player"), "Bad argument @ 'getPedMaxHealth' [Expected ped/player at argument 1, got " .. tostring(localPlayer) .. "]") local stat = getPedStat(localPlayer, 24) local maxhealth = 100 + (stat - 569) / 4.31 return math.max(1, maxhealth) end
    1 point
  17. I think the best way to ask those questions would be on here. Maybe some of us can answer it too.
    1 point
  18. واصل , بس حاول تطور فيه شي جديد ليكون مميز اكتر .. موفق
    1 point
  19. معندي سكايب تعرف aws amazon? انا شريت منه فبس لينكس ديبان
    1 point
  20. x*235/+100*health or x*235/-100*health
    1 point
  21. خف علينا يامصمم جراند انت
    1 point
  22. setElementData is meant to be temporary, so if a player rejoins, their elementData is cleared, if you restart the server all elementData is cleared, so yes, it is normal.
    1 point
  23. هههههههههه يب وطفشت من MTA عددها نقص مرة
    1 point
  24. انا حقي 2 GB Ram 32 Bit
    1 point
  25. وش ذا السيرفر CCDPlanet انا العب فقط FFS Gaming لما اكون طفشان ابغى سيرفر جديد اعطيني قصته
    1 point
  26. غير جهازك الي 64 بت والعب Hurtworld
    1 point
  27. العب سيرفر CCDPlanet سيرفر خيالي ولله مثل لعبه PUBG OR CounterStrike Source
    1 point
  28. والله يا عجرب حاوت معك كنت بقلك خش فورت نايت وتعال معي انا والشباب تيم بس للأسف جهازك ضعيف
    1 point
  29. 1 point
  30. السلام عليكم https://youtu.be/UoDCP7T2Veg
    1 point
  31. I kinda disagree. A good original game is about atmosphere, story and overall feel. Has little to do with the code base behind it. You can bend existing code to serve your purpose and create a whole new experience. You just use the tools at your disposal. If you do it properly, players will never know that you're using e.g. same underlying algorythm for counting xp as some older server did, and it won't matter to them. The purpose of _all_ of this is still keeping players entertained, right?
    1 point
  32. That's probably because when the GraczWyszedl is called the client might have been already disconnected so it doesn't call back the server event. I'm not too sure about this but it might be the cause.
    1 point
  33. You can also use: https://wiki.multitheftauto.com/wiki/BindKey keyState: The state of the key that was pressed, down if it was pressed, up if it was released. If this isn't working for you: https://wiki.multitheftauto.com/wiki/GetKeyState
    0 points
  34. Yeah i founded this both already. No clue why you're reply again if i marked the thread as "solved"
    0 points
  35. السلام عليكم ورحمة الله تعالى وبركاته فيديو غيابي عن البرمجة واليوتيوب ولماذا لا أقوم برفع مقاطع الفيديو ونشر السكربتات إلى الناس أتمنى لكم حسن المشاهدة
    0 points
×
×
  • Create New...