Leaderboard
Popular Content
Showing content with the highest reputation on 13/04/17 in Posts
-
2 points
-
local aTimer = { } function onPlayerChat_ ( aMsg , aType ) local isPlayerLogin = isGuestAccount ( getPlayerAccount ( source ) ) if ( isPlayerLogin ) then if ( isTimerPlayer ( source ) ) then outputChatBox("Stop spamming.",source, 255, 0, 0, true) return cancelEvent ( ) end setTimerPlayer ( source , 10000 ) outputChatBox('#666666(Downloading..) '.. getPlayerName(source) .. '#ffffff : '.. aMsg,root, r, g, b, true) return cancelEvent ( ) end end addEventHandler ( "onPlayerChat",root, onPlayerChat_ ) function isTimerPlayer ( player ) return isTimer ( aTimer [ player ] ) end function setTimerPlayer ( element , aTimer_ ) if ( getElementType( element ) ~= "player" ) then return end if ( isTimerPlayer ( element ) ) then return end aTimer [ element ] = setTimer( function ( ) end , aTimer_ , 1 ) end addEventHandler ( "onPlayerQuit" , root , function ( ) if ( aTimer [ source ] ) then aTimer [ source ] = nil end end )2 points
-
DOWNLOAD: https://community.multitheftauto.com/index.php?p=resources&s=details&id=14306 This countdown script draws digits in DX locally, it detects who is in the direct area of the player who triggers the countdown. Assuming these are participants of the race/event, they will get the DX '3, 2, 1' (or chosen lenght) on their screens.DEMONSTRATION: (7 seconds, = /cd 7 for my demo)Use: /cd [lenght in secs] for example 3 seconds: /cd 3= 3, 2, 1, GO! (including beep sounds like classic countdown)alt: /countdown, /cdn, etcIf someone gets auto-added to countdown unwanted, he can use /cstop to leave the countdown (as indicated in chat) so barely abusable; also it has anti spam timer, using countdown is limited by default to once per 40 seconds (you can modify the value in .lua, and also other values like area width for participants auto-add, max lenght in seconds etc)2 points
-
Server side function loginHandler ( usernamelogin, passwordlogin ) local accountlogin = getAccount ( usernamelogin, passwordlogin ) if ( accountlogin ~= false ) then logIn ( client, accountlogin, passwordlogin ) fadeCamera(client, false, 1.5) setTimer(fadeCameraDelay,1500,1,client) triggerClientEvent(client, "hideLogin", getRootElement()) else outputChatBox ( "Wrong username or password!", client, 255, 255, 0 ) -- the login failed end end addEvent("submitLogin",true) addEventHandler("submitLogin",root,loginHandler) Client side function clientSubmitLogin(button,state) if button == "left" and state == "up" then local usernamelogin = guiGetText(UserLogin) local passwordlogin = guiGetText(PassLogin) triggerServerEvent("submitLogin", getRootElement(), usernamelogin, passwordlogin) end end addEvent("hideLogin", true) addEventHandler("hideLogin", getRootElement(), function() guiSetInputEnabled(false) guiSetVisible(LoginPanel, false) showCursor(false) stopSound(loginpanelsong) end Should work mate.1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
عمل جميل بالتوفيق لكن كما تلاحظ اللوحة مو دي اكس ، الشيك بوكس والكومبو بوكس جيو ذذ الشيك بوكس سهل تسوي واحد دي اكس والكومبو بوكس ان شاء الله تلقى فكرة أحسن1 point
-
Here is a quick new video. A brand new way to load MTA. World premiere, using pefrmdllembed, the DLL to EXE injector. Not like it amounts to anything playable. You might enjoy this if you are a technological mind like me.1 point
-
Thank you for thóse kind words! I indeed see little use for MTA:BLUE because it just works. But I want to do a special installer for other projects, for example (as you mentioned) .ASI projects and alternative MTA solutions. Long term goals.1 point
-
This is a clever usage of EXE file format specifications, indeed. Although I don't think the mature codebase of MTA: SA will benefit from this, the best use case scenario I can think of right now is total conversion mods or enthusiast GTA: SA versions with some game-fixing ASI mods embedded in them (SilentPatch, etc.), and that's indeed useful. Well done!1 point
-
Not true in this case as Lua is case sensitive. But you're right, in this case it actually doesn't make much sense to create a new function to call just one other function, just use 'anonymous' function by putting it straight into addEventHandler. addEventHandler("event", element, function () otherFunction(arg) end)1 point
-
local screenW, screenH = guiGetScreenSize() local countdown function initTimer() if not isTimer(countdown) then -- make sure you can only start it once countdown = setTimer(countdownFin, 5000, 1) end end addCommandHandler("asd", initTimer, false, false) function countdownFin() removeEventHandler("onClientRender", root, eventszamlalas) end function eventszamlalas() local x = getTimerDetails(countdown) local timeLeft = math.ceil(x/1000) dxDrawLine((screenW * 0.4111) - 1, (screenH * 0.1244) - 1, (screenW * 0.4111) - 1, screenH * 0.1589, tocolor(254, 254, 254, 255), 1, false) dxDrawLine(screenW * 0.6118, (screenH * 0.1244) - 1, (screenW * 0.4111) - 1, (screenH * 0.1244) - 1, tocolor(254, 254, 254, 255), 1, false) dxDrawLine((screenW * 0.4111) - 1, screenH * 0.1589, screenW * 0.6118, screenH * 0.1589, tocolor(254, 254, 254, 255), 1, false) dxDrawLine(screenW * 0.6118, screenH * 0.1589, screenW * 0.6118, (screenH * 0.1244) - 1, tocolor(254, 254, 254, 255), 1, false) dxDrawRectangle(screenW * 0.4111, screenH * 0.1244, screenW * 0.2007, screenH * 0.0344, tocolor(0, 0, 0, 161), false) dxDrawText("Az event elkezdődött! Vége: "..convertSecondsToMinutes(timeLeft), screenW * 0.4118, screenH * 0.1244, screenW * 0.6118, screenH * 0.1589, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) end function convertSecondsToMinutes(sec) local temp = sec/60 local temp2 = (math.floor(temp)) local temp3 = sec-(temp2*60) if string.len(temp3) < 2 then temp3 = "0"..tostring(temp3) end return tostring(temp2)..":"..tostring(temp3) end Does now. Try it1 point
-
Well you should put this before outputChatBox thing.... local account = getPlayerAccount(source) if isGuestAccount(account) then return outputChatBox("Please login first",source,255,0,0) end1 point
-
1 point
-
1 point
-
DOWNLOAD: https://community.multitheftauto.com/index.php?p=resources&s=details&id=14305 This script adds infinite nitro to your car, never re-add the upgrade anymore!Also changes mechanism:- Hold down Mouse button left-click to use nitro aslong you need it, release it and it'll be gone. (useful for when you need just that extra boost)- Press right CTRL for infinite persistent nitro (it will never stop) and you don't have to hold down anything. Drive with Nitro permanently, until you interrupt it (interrupt: click left-mouse again, or press right CTRL again to switch it off)The first mode (hold left click) works similarly to the ''nos-nfs'' script, so it may be familiar - but it's all from scratch and implemented differently.By default, it also removes the speed blur of nitro, due to it becoming annoying to the eye when you keep using nitro as it's infinite. Remove that from .lua beginning if you want to keep blur. Simple, but useful for several types of gamemodes.1 point
-
1 point
-
1 point
-
1 point
-
Modificá a tu gusto addEventHandler("onResourceStart", resourceRoot, function() if not isElement(crazy) and not isElement(hades) then spawnBot_Crazy() end end ) function spawnBot_Crazy() if not isElement(crazy) then crazy = exports["slothBot"]:spawnBot( 1262.77, -2029.756, 59.341, 90,math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true) --exports.extra_health:setElementExtraHealth(crazy, 1000) setElementModel ( crazy, 312 ) outputChatBox("Apareció el Boss Crazy!") end end function spawnBot_Hades() if not isElement(hades) then hades = exports [ "slothBot" ]:spawnBot ( 1262.77, -2029.756, 59.341, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) --exports.extra_health:setElementExtraHealth(hades, 1000) setElementModel ( hades, 38 ) outputChatBox("Apareció el Boss Hades!") end end addEvent("onBotWasted", true) addEventHandler("onBotWasted", root, function (attacker) if attacker then if attacker ~= source then if getElementType(attacker) == "player" then if isElement(crazy) then givePlayerMoney(attacker, math.random(1000, 5000)) outputChatBox("Muerto Crazy") setTimer(spawnBot_Hades, 10000, 1) end if isElement(hades) then givePlayerMoney(attacker, math.random(1000, 5000)) outputChatBox("Muerto Hades") setTimer(spawnBot_Crazy, 60000, 1) end end end end end ) addEventHandler("onResourceStop", resourceRoot, function() if isElement(crazy) then destroyElement(crazy) end if isElement(hades) then destroyElement(hades) end end )1 point
-
Modifier des loots, en ajouter ou en soustraire ce n'est pas modifier le script. Ajouter des coordonées dans une table pour ajouter des loots tout le monde peut le faire. Ce qu'il faut c'est trouver des systèmes inédits et les réaliser. Par exemple, je développe depuis plusieurs mois un GM de A à Z inspiré du principe de DayZ. J'ai fait un systèm de construction, un systèm de tourrelles, un système de forêt etc... Ce qu'il faut c'est se démarquer faire de l'inédit partiel. Pas un truc de totalement nouveau si tu n'en as pas l'inspiration, un truc qui change de l'ordinaire, un truc qu'on ne voit pas souvent.1 point
-
mySQL/SQLite/XML: "Long Life" Storage Method. elementData, tables: Streaming data method. It's not correct 100%, but it's useful to catch the difference between them. And about the use of elementData I totally discourage it's use with the purpose of syncing big amounts of data with the client or the server. I like to use Tables and Events instead of elementData ( little bit more difficult but it worth's it ).1 point
-
What does element data have to do with mysql? If you are talking about caching the information, then you should use a server-side table instead of element data. You load things like player stats etc. when they login, you save it when they quit.1 point
-
مود جميل حلو بس ابي طلب ابي مود اخاتر مهمات عشان يفتحو يعني مثلا ابي افتح ديربي افتح لوحة وادوس ديربي يفتح يعني مو تلقائي ديربي يفتح انا افتوحو1 point
-
اهنيك يا ابو سولو مود خورافي بس لو تسوي ذا المود مثل واحد في الديربي ما تقدر تنتقل له يطلع الشخص في مهمه و واصل1 point
