Leaderboard
Popular Content
Showing content with the highest reputation on 21/04/17 in Posts
-
2 points
-
Hi! Following the community discussion in our forums, we have created an official Discord server quite a while ago, as an alternative (and maybe a full replacement in the future) to our current IRC channels. We kept it in under the radar while we were fine tuning things, but we believe we can now present it to you guys. All MTA players and fans are welcome to join our Discord server (though please behave while you are in there ). You can join it by using this link: https://discord.gg/mtasa What is Discord? Discord is a hybrid of IRC, an Instant Messenger and a Voice Chat software. It incorporates the most important features of these elements into a handy and multiplatform app which you can run on your desktops, smartphones or tablets. Why is it cool? Compared to IRC, it offers a built-in chat history buffer, so even if you are offline, you can still catch up with what happened in the channels then. IRC also offers that, but only through an IRC Bouncer that you either need to pay for, or have someone host it for you. It also has a modern look and features such as URL embedding (regular websites, but also pictures and videos), handy syntax colouring for pasted code snippets, emojis (also custom ones), chat messages reactions, Steam integration and more. What can I find while I am there? We currently have some channels created, including: #general - for general MTA and offtopic chats #scripting - for Lua scripting-related queries #support - for any problems related to MTA:SA client or server #announcements - for all important messages from us as well as some others. We are still thinking of how to put our Discord server into its full potential, so we may add more channels soon. Can I have Discord app installed and/or running on several of my devices concurrently? Can I use more than one server? Sure, absolutely. It will sync the messages automatically. And yes, you can add more servers than just our one. How do I join it? Hey, we have mentioned that already. Just click the link below and follow the instructions: https://discord.gg/mtasa I have a suggestion about the Discord... Okay, let us know. As usual, we are open for suggestions. Just post in this topic or hit us up directly on Discord. Hope to see you there! -- MTA Team1 point
-
I was bored and long time without do any script so I started looking in the wiki some functions what I not used yet and I found dxDrawMaterialLine3D. You have a video and code about a scoreboard what I made for test this function. Maybe this can be useful for you ( take scrollbar, etc ). Client-Side code:1 point
-
Hi to everyone For now this project is stopped because the original server back to be online later i will release some scripts that maybe other people can use please visit my github if you need a basic freeroam/RPG gamemode https://github.com/juanruiz85/project-roleplay/ IP Adress: Server Offline mtasa://------------:22003 update 13 /August / 2016 Here three videos that did that some staff of FTA get mad .... but really i like a lot their server and because of this I stop the project, maybe i not will put at server online but i will work in this gamemode on my free time.. then this project not is dead i think that for now i will remove this resource of the gamemode because its a copy of FTA Script and i not want BAN Please visit FTA server mtasa://185.101.94.137:22003 maybe you can found me there. or their web page http://fulltheftauto.net/ We used the following resources for give more life to the gamemode:1 point
-
Estaba aburrido y llevaba bastante tiempo sin scriptear así que me puse a buscar por la wiki funciones que nunca usé y encontré dxDrawMaterialLine3D. Aquí os dejo un vídeo y el código de un scoreboard simple que he hecho para probar la función, por si os es útil el tema del scroll y lo que podáis encontrar. Código Client-Side:1 point
-
You've got to handle each variable into the dbExec calling. So you could think of something like this making a function for each SQL Action: local VARS = table.concat({...}, ",") local SQL_ACTION = "INSERT INTO table ( 'key', 'key', 'key' ) VALUES ( " local SQL_VALUES = "" for value in string.gmatch(str, '([^,]+)') do SQL_VALUES = SQL_VALUES .. " '" .. value .. "'," end SQL_VALUES:sub( 1, -2 ) SQL_ACTION = SQL_ACTION .. SQL_VALUES .. ")" dbExec( SQL_ACTION ) -> It's just an example it should work if it's right used.1 point
-
1 point
-
1 point
-
We, or atleast I, don't understand anything from this post. Maybe try to explain it better.1 point
-
You ain't using the convertedMoney2 variable anywhere. local lastMoney = 0 local drawMoney = nil setTimer(function() local playerMoney2 = getPlayerMoney(localPlayer) if playerMoney2 ~= lastMoney then drawMoney = playerMoney2 - lastMoney if isTimer(resetingTimer) then killTimer(resetingTimer) end resetingTimer = setTimer(function() drawMoney = nil end, 3000, 1) end lastMoney = playerMoney2 end, 50, 0) addEventHandler("onClientRender", getRootElement(), function() if drawMoney then removeEventHandler("onClientRender", root, alappenz) dxDrawText((drawMoney > 0 and ("+" .. comma_value(drawMoney)) or comma_value(drawMoney)), screenW * 0.8674, screenH * 0.0389, screenW * 0.9889, screenH * 0.0644, drawMoney > 0 and tocolor(0, 255, 0) or tocolor(255, 0, 0), 1, "default-bold", "center", "center") else addEventHandler("onClientRender", root, alappenz) end end) function comma_value(n) -- credit http://richard.warburton.it local left,num,right = string.match(n,'^([^%d]*%d)(%d*)(.-)$') return left..(num:reverse():gsub('(%d%d%d)','%1,'):reverse())..right end1 point
-
function comma_value(n) -- credit http://richard.warburton.it local left,num,right = string.match(n,'^([^%d]*%d)(%d*)(.-)$') return left..(num:reverse():gsub('(%d%d%d)','%1,'):reverse())..right end Try to use this one instead, this is a better format.1 point
-
dxDrawText((drawMoney > 0 and ("+" .. drawMoney) or drawMoney), 0, 0, 100, 100, drawMoney > 0 and tocolor(0, 255, 0) or tocolor(255, 0, 0), 1, "default-bold")1 point
-
local lastMoney = 0 local drawMoney = nil setTimer(function() local playerMoney = getPlayerMoney(localPlayer) if playerMoney ~= lastMoney then drawMoney = playerMoney - lastMoney if isTimer(resetingTimer) then killTimer(resetingTimer) end resetingTimer = setTimer(function() drawMoney = nil end, 500, 1) end lastMoney = playerMoney end, 100, 0) addEventHandler("onClientRender", getRootElement(), function() if drawMoney then dxDrawText(drawMoney, 0, 0, 100, 100, drawMoney > 0 and tocolor(0, 255, 0) or tocolor(255, 0, 0), 1, "default-bold") end end) Try this one.1 point
-
local avaibleSkins = { 0, 1, 2 } local spawnPoints = { {0, 0, 0, 0}, {10, 10, 10, 90} } function spawnSurvivor() local random1 = math.random(1, #avaibleSkins) local random2 = math.random(1, #spawnPoints) survivorPed = createPed(avaibleSkins[random1], spawnPoints[random2][1], spawnPoints[random2][2], spawnPoints[random2][3], spawns[random2][4]) survivorMarker = createMarkerAttachedTo ( survivorPed, "cylinder", 4.0, 0, 0, 255, 255 ) survivorBlip = createBlipAttachedTo( survivorPed, 47 ) addEventHandler("onPedWasted", survivorPed, killedPed) outputChatBox("The Survivor Was Saved! New one spawning soon.") end function killedPed() outputChatBox("The Survivor Was Saved! New one spawning soon.") destroyElement(survivorMarker) destroyElement(survivorBlip) destroyElement(survivorPed) setTimer(spawnSurvivor, 15000, 1) end You gotta learn have to fix easy errors like these.1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
You could have googled that by yourself and you would find out the answer in just a few minutes without the need to create a topic and having to wait for 17 hours for someone to reply to it1 point
-
The default race resource comes with a nametag script. So you can check how it works there and edit it.1 point
-
1 point
-
Try to use getPedWeapon on the attacker to get his weapon on his current slot, and check with that ID if it's a melee.1 point
-
من الأسل تقدر تحدد مين يفك ومين يفتح command.unmute للقروبات الي ودك تخلبها تفك ميوت حط true وللقروبات الي مت ودك تفك كيوت خلها false1 point
-
try this, but you will have to clear previous account data that saved lastlogin otherwise it will still show same thing. addEventHandler("onPlayerLogin", getRootElement(), function(_, theAccount) local timeAtm = getRealTime().timestamp local lastLogin = getAccountData(theAccount, "acc:lastLogin") or timeAtm local lastTime = getRealTime(lastLogin) local timeText = lastTime.year + 1900 .. ". " .. string.format("%02d", lastTime.month+1) .. ". " .. string.format("%02d", lastTime.monthday) .. " " .. string.format("%02d", lastTime.hour) .. ":" .. string.format("%02d", lastTime.minute) .. ":" .. string.format("%02d", lastTime.second) outputChatBox("Last login date: " .. timeText, source, 255, 255, 255, true) setAccountData(theAccount, "acc:lastLogin", timeAtm) end)1 point
-
It's best if you create a custom handling for each vehicle that you want to change it on because as @Dutchman101 already said: each vehicle reacts differently to the same value of acceleration.1 point
-
1 point
-
1 point
-
تكتب اقرا مب أقراء, ذا أولاً ثانياً أدري انه يبي كود لكن أنا ابيه يسوي كوده ويطرحه عشان نصححه اذا كلامي مب عاجبك تقدر تتفنن وتطرح أكوادك له1 point
-
1 point
-
* convertWordsToSound *only Server Side Author: HasoN Syntax: convertWordsToSound(string text) Required Arguments: • text: الكتابة الي تبغا تحولها لـ كلام __ Code: --Server Side function convertWordsToSound(str) local str2 = "" str2 = "http://translate.google.com/translate_tts?tl=en&q="..str.."" triggerClientEvent(source,"VoiceClient",source,str2) end --Client Side function sayVoice(str) currentVoice = playSound(str) end addEvent("VoiceClient",true) addEventHandler("VoiceClient",localPlayer,sayVoice) Example: _______ Server Side: function convertWordsToSound(str) local str2 = "" str2 = "http://translate.google.com/translate_tts?tl=en&q="..str.."" triggerClientEvent(source,"VoiceClient",source,str2) end addEventHandler("onPlayerChat",root, function (messag) convertWordsToSound(messag) end) Client Side: function sayVoice(str) currentVoice = playSound(str) end addEvent("VoiceClient",true) addEventHandler("VoiceClient",localPlayer,sayVoice) طبعا فائدة الفنكشن واضحة جدا ، من اسمه يحول اي كلام تكتبه لـ صوت بدل ماتحط اصوات وتحميلات والخ ، كله بـ كود بسيط واحد __ المثال اعلاه ، لو اي حد تكلم بالسيرفر بيجي الكلام حقه صوت _ طبعا الفنكشن لايتقبل غير الكلمات الانجليزية ،، ولو تبغا تخليه يتقبل العربية بتغير سطر 3 بالكود جهة سيرفر str2 = "http://translate.google.com/translate_tts?tl=en&q="..str.."" تحولها الى str2 = "http://translate.google.com/translate_tts?tl=ar&q="..str.."" _ طبعا الفكرة حقت الأخ " ميمو برنس" ذذ وان شاء الله يفيدكم الفنكشن Edit: تم اضافة صفحة الويكي https://wiki.multitheftauto.com/wiki/Co ... rdsToSound1 point
