Jump to content

Search the Community

Showing results for tags 'outputchatbox'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 10 results

  1. --- Server ----- local marker123 = createMarker(589.438, 870.218, -42.497, 'cylinder', 1.0, 30, 144, 255, 150) function marker123(markerHit) setElementData ( source, "Emprego", "Mineirador" ) outputChatBox("/infos para marcar os markers",source,255,255,0) -- Output that they are. end addEventHandler("onPlayerMarkerHit",getRootElement(),marker123) outputchatbox aparecendo em todos os markers do server, alguma ideia de como corrigir?
  2. local isWindowShowing = false --عشان نعرف الزر ظاهر او لا false متغير بالقيمة local screenW, screenH = guiGetScreenSize() --ذي عشان تجيب احدثيات شاشتك function renderDx() dxDrawRectangle(screenW * 0.2844, screenH * 0.4644, screenW * 0.0919, screenH * 0.0378, tocolor(0, 0, 0, 100), false) --مربع علي شكل زر dxDrawText("تجربة", screenW * 0.2844, screenH * 0.4644, screenW * 0.3762, screenH * 0.5022, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, false, false, false) --داخل المربع كلام end --نقفل الفنكشن function onKey() if isWindowShowing == false then --بمعنى الزر حالياً مخفي false لو المتغير قيمته showCursor(true) --اظهار الماوس isWindowShowing = true --بمعنى الزر ظاهر حالياً true نعطي المتغير قيمه addEventHandler("onClientRender", getRootElement(), renderDx) --نظهر الزر الآن elseif isWindowShowing == true then --بمعنى الزر ظاهر حالياً true لو المتغير قيمته showCursor(false) --نخفى الماوس isWindowShowing = false --بمعنى الزر انحذف الآن false نعطى المتغير قيمه removeEventHandler("onClientRender", getRootElement(), renderDx) --نحذف الزر الآن end --نقفل التحقق end --نقفل الفنكشن bindKey("F9", "down", onKey) --ذا ايفنت من اللعبة انه لما يضغط اف 9 يحصل شئ --// لما يضغط على المربع (الزر) function onClick(theButton, theState) --بين القوسين أحدثيات الرستنقل (المربع) وليس التيكست (الكلام اللى جوا المربع) isMouseInPosition ملاحظه: بتحط تحت فالكود if theButton == "left" and theState == "down" and isWindowShowing == true and isMouseInPosition(screenW * 0.2844, screenH * 0.4644, screenW * 0.0919, screenH * 0.0378) then --لو ضغط كلك يسار فى الماوس واللوحة ظاهره حالياً (بنعرف عن طريق المتغير) والماوس على المربع اللي هو الزر (بنعرف عن طريق احدثيات الشاشة) outputChatBox("تجربة") --نظهر فى الشات تجربة end --نقفل التحقق end --نقفل الفنكشن addEventHandler("onClientClick", getRootElement(), onClick) --ذا ايفنت من اللعبة ان لما الاعب يضغط بالماوس علي الشاشة --// ذا كود جاهز يتحقق من احدثيات الشاشة عشان لما نضغط على المربع (الزر) function isMouseInPosition(x, y, width, height) if not isCursorShowing() then return false end local sx, sy = guiGetScreenSize() local cx, cy = getCursorPosition() local cx, cy = cx * sx, cy * sy if (cx >= x and cx <= x + width) and (cy >= y and cy <= y + height) then return true else return false end end اتمنى الشرح واضح وبسيط للناس الجدد فى برمجة اللغة، يمكنك ايضاً تغيير اظهار فى الشات تجربة إلى اشياء اخرى كثيرة https://wiki.multitheftauto.com/wiki/Main_Page :يمكنك الاطلاع على جميع الفنكشنات حق اللعبة من هنا
  3. local vehicle; function makeVeh(player, cmd, vehID) if (vehID) then else outputChatBox("#FFFFFF[#FF4F4fHiba#FFFFFF] Használat : /makeveh [Modell ID]", player, 255, 0, 0, true ); end end addCommandHandler("makeveh", makeVeh) Worthless Cynomys youtube videói alapján el kezdtem scriptelni, már sikerült egy alap hud-ot írnom 0-ról, de valamiért itt elakadtam. A problémám kifejtve : Ha az outputChatBox végére odarakom a true-t (Ugye hogy színkódolt-e) akkor nem írja ki az üzenetet, és próbáltam úgy is, hogy kitörlöm a 255, 0, 0,-t a scriptből, de úgy sem. Valaki erre egy megoldást? (Worthless-nél a szövegen és a színkódon kívül ugyan így volt írva, és nála működött.)
  4. I'm having a problem, when I'm on a team, some outputChatBox end up doubling, both the chat, as well as some alert scripts, and for those who aren't on any team, it remains normal, in the Log, everything is normal. Note: it is not a problem of Freeroam, Tag script. I search in all my files for outputChatBox and found nothing wrong. In team: Without TEAM set: Is this a MTA problem? (Everything was normal when I closed the server, reopened with everything the same and now this is happening.) (Closed the server in 1.5.6 and re-opened in 1.5.7)
  5. Hi Everyone! Can someone help me, how can I make that, if a fire is created it outputs the chatbox the fire's position (example: "The LSPD is on fire" or "The Hospital is on fire" . The Script Files: FireC.lua local fireElement = {} addEvent("FireServer.rootFireCreate",true) addEventHandler("FireServer.rootFireCreate",getRootElement(),function(rand) local fire = createFire(FirePositions[rand][1], FirePositions[rand][2], FirePositions[rand][3], FirePositions[rand][4], FirePositions[rand][5], FirePositions[rand][6]) fireElement[#fireElement + 1] = fire end) addEventHandler ("onClientResourceStart", getRootElement(), function (res) if res ~= getThisResource() then return end triggerServerEvent("FireServer.loadMe", localPlayer, localPlayer) end) function draw() for k,v in ipairs(getElementsByType("object")) do if getElementData(v, "Fire->object") then local x, y ,z = getElementPosition(v) local wx, wy, wz = getScreenFromWorldPosition(x , y, z+1) if wx and wy then local playerx, playery, playerz = getElementPosition(getLocalPlayer()) if getDistanceBetweenPoints3D(playerx, playery, playerz, wx, wy, wz) <= 5 then dxDrawRectangle(wx-200/2,wy,200,30,tocolor(0,0,0,255/2)) dxDrawRectangle(wx-200/2+5,wy+5,190,20,tocolor(124, 197, 118,255/2)) end end end end end addEventHandler("onClientRender", root, draw) FireG.lua FirePositions = { -- X, Y, Z, Range(FireSize) [1] = {2114.1240234375, -1756.2508544922, 13.3984375, 800}, } FireS.lua local loadedPlayers = {} local fireBar = {} FireServer = {} function FireServer.start(player) loadedPlayers[#loadedPlayers + 1] = player end addEvent("FireServer.loadMe", true) addEventHandler("FireServer.loadMe", root, FireServer.start) function FireServer.FireCreate() if math.random(1, 3) == 2 then local rand = math.random(#FirePositions) if fireBar[rand] then return end for k,v in pairs(loadedPlayers) do triggerClientEvent(v, "FireServer.rootFireCreate", v, rand) fireBar[rand] = createObject(1337, FirePositions[rand][1], FirePositions[rand][2], FirePositions[rand][3] - 1) setElementAlpha(fireBar[rand], 0) setElementCollisionsEnabled(fireBar[rand], false) setElementData(fireBar[rand], "Fire->object", true) end end end setTimer(FireServer.FireCreate, 1000, 0)
  6. Greetings, my name is Martin, i have a question: How can i see the original script about outputChatBox´s function ? I need it, pls answer me.
  7. Hello! I want to make a script, which would make my days more confortable while writing scripts into mtaserver.conf, by a very simple outputchatbox script, but i have no idea how to fix this. Script: function mtaserverconf(thePlayer, cmd, variable) local startup = "1" local protected = "0" outputChatBox ("<resource src="..tostring(variable).." startup="..startup.." protected="..protected.." />", thePlayer) end addCommandHandler ("m", mtaserverconf) The problem is: If i type in m asd it would display the following: <resource src=asd startup=1 protected=0 /> <!--this is a bad syntax, there are missing symbols--> <resource src="asd" startup="1" protected="0" /> <!-- this is a good one--> Can somebody help me to make this possible?
  8. I have a problem with the visibility of outputChatBox. So it's part of a GUI. You press the button on the GUI, it sends the command to the server, the server checks if you have the money for the stuff and if you have, you got a fancy new weapon, but if you don't, the server triggers a clientside event, wich outputs the message, that you don't have enough money. The problem is, that the message, that warns you, that you don't have the money, appears for every online player. CLIENTSIDE function nomoney() outputChatBox("Nincs rá pénzed.") end addEvent("nomoney", true) addEventHandler("nomoney", resourceRoot, nomoney) SERVERSIDE function Deagleb() money = getPlayerMoney(client) if money>=100 then setPlayerMoney(client, money-100) giveWeapon(client, 24, 14, true) else triggerClientEvent("nomoney", resourceRoot) end end addEvent("Deagle", true) addEventHandler("Deagle", resourceRoot, Deagleb) Thanks for the help.
  9. So, my problem is, that i made a GUI, and when it opens, it opens for all the players online and the setElementFrozen affects every player, etc. The GUI is attached to markers, so when you enter the marker, the GUI pops up. But it pops up for everyone. If you're not in the ACL group, you're not allowed to use the GUI, so it closes, when you press a button and outputs a message that you're not allowed to use it. I have the same problem with outputChatBox. The message appears for everyone. So my question is, that how could is make the GUI appear and affect only the actual user, and the outputChatBox appear only for the player i want? If you need the Scripts, just let me know and I'll instert it here. Thanks for the help.
  10. function checkAFKPlayers() for index, source in ipairs(getElementsByType("player")) do if (getPlayerIdleTime(source) > 1000) then setElementDimension ( source, 50) setElementAlpha(source, 50) outputChatBox("#004B00[DDC - Afk] #FFffFFNem mozogtál 2 percig, afk módba léptél! Kikapcsoláshoz mozdulj meg!", root, 255,000,000, true) elseif isElementMoving(source) then setElementAlpha(source, 255) setElementDimension ( source, 0) outputChatBox("#004B00[DDC - Afk] #FFffFFKiléptél az afk módból!", root, 255,000,000, true) end end end setTimer(checkAFKPlayers, 1000, 0) function isElementMoving ( theElement ) if isElement ( theElement ) then local x, y, z = getElementVelocity( theElement ) return x ~= 0 or y ~= 0 or z ~= 0 end return false end how to fix this? i want once outputChatbox
×
×
  • Create New...