Leaderboard
Popular Content
Showing content with the highest reputation on 02/02/18 in all areas
-
2 points
-
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
-
1 point
-
Ищем вхождение в слово с помощью string.find Мы узнали какую позицию в строке занимает первое совпадение. Пробелы до и после текста ищем перебирая каждый символ в строке. Если совпадение найдено - отмечаем его. Если найдено еще одно совпадение, но позицию (которую нашли) мы еще не прошли - значит это не искомое слово, присваиваем ему позицию нашего нового пробела. Так ищем то самое слово - отмечаем пробел до и после него. И заменяем. Все делается циклом и строковыми функциями.1 point
-
Then you have to change triggerClientEvent(source,"doki2",source) to triggerClientEvent(root, "doki2", source) in every line.1 point
-
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
-
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
-
-~- المود فكرته رهيبة لكن عندي لك اقتراح لو تخليه يشتري مفجرات يقدر يحطها بالسيارة ويفجرها يعني مو لازم تعطيه سيارة تعطيه متفجرات وبس وهو يدبر سيارة لحاله اتمنى يعجبك اقتراحي -~-1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
You could create a table, assigning IDs to existing object IDs, but in the engine, no.1 point
-
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]) -- 21 point
-
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
-
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) end1 point
-
I think the best way to ask those questions would be on here. Maybe some of us can answer it too.1 point
-
1 point
-
معندي سكايب تعرف aws amazon? انا شريت منه فبس لينكس ديبان1 point
-
1 point
-
1 point
-
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
-
1 point
-
1 point
-
وش ذا السيرفر CCDPlanet انا العب فقط FFS Gaming لما اكون طفشان ابغى سيرفر جديد اعطيني قصته1 point
-
1 point
-
1 point
-
والله يا عجرب حاوت معك كنت بقلك خش فورت نايت وتعال معي انا والشباب تيم بس للأسف جهازك ضعيف1 point
-
1 point
-
1 point
-
1 point
-
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
-
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
-
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/GetKeyState0 points
-
Yeah i founded this both already. No clue why you're reply again if i marked the thread as "solved"0 points
-
السلام عليكم ورحمة الله تعالى وبركاته فيديو غيابي عن البرمجة واليوتيوب ولماذا لا أقوم برفع مقاطع الفيديو ونشر السكربتات إلى الناس أتمنى لكم حسن المشاهدة0 points