Jump to content

Search the Community

Showing results for tags 'outputchatbox'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


Last Updated

  • Start


Filter by number of...


  • Start



About Me

Member Title





Found 9 results

  1. --// by iManGaaX (Youssef Maged). 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("Test button", 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 --نقفل الفنكشن --// لما يضغط على اف9 يظهر البوتن function onKey(theButton, theState) if theButton == "F9" and theState == true and isWindowShowing == false then --لو ضغط على اف 9 والمتغير قيمته false بمعنى الزر حالياً مخفي showCursor(true) --اظهار الماوس isWindowShowing = true --نعطي المتغير قيمه true بمعنى الزر ظاهر حالياً addEventHandler("onClientRender", getRootElement(), renderDx) --نظهر الزر الآن elseif theButton == "F9" and theState == true and isWindowShowing == true then --لو ضغط اف 9 ولاكن المتغير قيمته true بمعنى الزر ظاهر حالياً showCursor(false) --نخفى الشات isWindowShowing = false --نعطى المتغير قيمه false بمعنى الزر انحذف الآن removeEventHandler("onClientRender", getRootElement(), renderDx) --نحذف الزر الآن end --نقفل التحقق end --نقفل الفنكشن addEventHandler("onClientKey", getRootElement(), onKey) --// لما يضغط على الرستنقل (البوتن) 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("test") --اظهار فالشات تيست 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 =(cxsx),(cysy) if (cx >= x and cx <= x + width) and (cy >= y and cy <= y + height) then return true else return false end end --// أتمنى الشرح واضح وبسيط, شكراً.
  2. 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.)
  3. 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)
  4. 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)
  5. 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.
  6. 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?
  7. 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.
  8. 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.
  9. 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...