Jump to content

Search the Community

Showing results for tags 'Lua'.

  • 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

  1. local blockedTags = { "[VIP]", "[UltraVIP]", "[A]", "[M]", "[SM]" }; addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), function () for i, p in ipairs ( getElementsByType ( "player" ) ) do local tempName = getPlayerName ( p ); for x = 1, #blockedTags do if ( string.find ( tempName, blockedTags [ i ], 1, true ) ~= nil ) then kickPlayer ( source, "Rang tag nem lehet a nevedben! Szedd le! Köszikee :D" ); end end end end ); addEventHandler ( "onPlayerJoin", root, function () local name = getPlayerName ( source ); for i = 1, #blockedTags do if ( string.find ( name, blockedTags [ i ], 1, true ) ~= nil ) then kickPlayer ( source, "Rang tag nem lehet a nevedben! Szedd le! Köszikee :D" ); end end end ); addEventHandler ( "onPlayerChangeNick", root, function ( _, newNick ) for i = 1, #blockedTags do if ( string.find ( newNick, blockedTags [ i ], 1, true ) ~= nil ) then kickPlayer ( source, "Rang tag nem lehet a nevedben! Szedd le! Köszikee :D" ); end end end ); server.lua:9: bad argument #2 to 'find' (string expected, got nil) why??
  2. local function ujteamsay(message, messageType) if messageType == 2 then cancelEvent() outputChatBox("(CSOPORT) "..getPlayerName(source)..": #FFffFF"..message, root, red, green, blue, true ) end end addEventHandler("onPlayerChat", root, ujteamsay) how to fix this? i want just team mates see the message.. *sorry for my very bad English :c*
  3. local screenW, screenH = guiGetScreenSize() addEventHandler("onClientRender", root, function() dxDrawRectangle(screenW * 0.0021, screenH * 0.7356, screenW * 0.2104, screenH * 0.0367, tocolor(0, 0, 0, 164), false) dxDrawText(text, screenW * 0.0014, screenH * 0.7367, screenW * 0.2125, screenH * 0.7722, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, true, false) end ) addEventHandler("onClientPlayerJoin", root, function() local l_2_0 = getPlayerName(source) text = "#00ff00" .. l_2_0 .. " csatlakozott!" pic = "j" end ) addEventHandler("onClientPlayerQuit", root, function(l_3_0) local l_3_1 = getPlayerName(source) text = "#FF0000" .. l_3_1 .. " lelépett!" pic = "q" end ) addEventHandler("onClientPlayerChangeNick", root, function(l_4_0, l_4_1) text = "" .. l_4_0 .. "#00FF00 Új neve #00BAFF: " .. l_4_1 .. "" pic = "c" end ) fileDelete("client.lua") and i got this warning: : 6 : bad argument 'dxDrawText' [expected string at argument 1, got nil] how to fix this?
  4. function North () local north = createBlipAttachedTo ( north, 4 ); dxDrawImage(north, 20, 20, 'files/images/blips/north.png', 0, 0, 0, tocolor(0, 0, 0, 255), false); end i tried this, but doesn't working. how to add north blip to a radar script?
  5. Hi all! I'm dont speak English, I use google translate ERROR: [DayZ-MTA]/DayZ/survivorSystem.lua:374: attempt to index global 'elementWeaponRaplace' (a nil value) Function: Line warning if elementWeaponRaplace[source] then Help remove this warning please!
  6. addEventHandler("onPlayerLogout", getRootElement(), function () local name = getPlayerName ( source ) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then exports[getResourceName(resource)]:addNotification(root, name.." kilépett a tulajdonos szolgálatból!", "success") end end ) what wrong? onPlayerLogin working with this.. wtf?!
  7. client: local localPlayer = getLocalPlayer() local playerName = getPlayerName(localPlayer) function noBinds() guiSetInputMode("no_binds_when_editing") end addEventHandler("onClientResourceStart", root, noBinds) function createLoginWindow() windowLogin = guiCreateWindow(0.3945,0.3646,0.2109,0.2018,"Magyar Play Szerver - Loginpanel by turbesz",true) guiSetSize(windowLogin, 270, 175, false) guiSetAlpha(windowLogin,1) labelUsername = guiCreateLabel(10,52,59,24,"Felh.név:",false,windowLogin) guiSetAlpha(labelUsername,1) guiLabelSetColor(labelUsername,255,255,255) guiLabelSetVerticalAlign(labelUsername,"center") guiLabelSetHorizontalAlign(labelUsername,"left",false) labelPassword = guiCreateLabel(10,86,59,24,"Jelszó:",false,windowLogin) guiSetAlpha(labelPassword,1) guiLabelSetColor(labelPassword,255,255,255) guiLabelSetVerticalAlign(labelPassword,"center") guiLabelSetHorizontalAlign(labelPassword,"left",false) labelInfo = guiCreateLabel(10,26,250,17,"Regizz, és jelentkezz be a játékhoz.",false,windowLogin) guiSetAlpha(labelInfo,1) guiLabelSetColor(labelInfo,255,255,255) guiLabelSetVerticalAlign(labelInfo,"top") guiLabelSetHorizontalAlign(labelInfo,"center",false) guiSetFont(labelInfo,"default-bold-small") editUsername = guiCreateEdit(79,52,181,25,"",false,windowLogin) guiSetAlpha(editUsername,1) guiEditSetMaxLength(editUsername, 50) editPassword = guiCreateEdit(79,86,181,25,"",false,windowLogin) guiSetAlpha(editPassword,1) guiEditSetMasked(editPassword, true) guiEditSetMaxLength(editPassword, 50) buttonLogin = guiCreateButton(10,121,120,21,"Bejelentkezés",false,windowLogin) guiSetAlpha(buttonLogin,1) buttonRegister = guiCreateButton(143,121,117,21,"Regisztrálás",false,windowLogin) guiSetAlpha(buttonRegister,1) buttonGuest = guiCreateButton(10,145,121,21,"Vendég",false,windowLogin) guiSetAlpha(buttonGuest,1) checkbox_save = guiCreateCheckBox(157,145,117,21,"Adatok mentése",false,false,windowLogin) guiSetFont(checkbox_save,"default-small") guiWindowSetSizable ( windowLogin, false ) guiSetVisible(windowLogin, false) addEventHandler("onClientGUIClick", buttonLogin, clientSubmitLogin, false) addEventHandler("onClientGUIClick", buttonRegister, clientSubmitRegister, false) local username, password = loadLoginFromXML() if not( username == "" or password == "") then guiCheckBoxSetSelected ( checkbox_save, true ) guiSetText ( editUsername, tostring(username)) guiSetText ( editPassword, tostring(password)) else guiCheckBoxSetSelected ( checkbox_save, false ) guiSetText ( editUsername, tostring(username)) guiSetText ( editPassword, tostring(password)) end end function loadLoginFromXML() local xml_save_log_File = xmlLoadFile ("files/xml/adatok.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/adatok.xml", "login") end local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if usernameNode and passwordNode then return xmlNodeGetValue(usernameNode), xmlNodeGetValue(passwordNode) else return "", "" end xmlUnloadFile ( xml_save_log_File ) end function saveLoginToXML(username, password) local xml_save_log_File = xmlLoadFile ("files/xml/adatok.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/adatok.xml", "login") end if (username ~= "") then local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) if not usernameNode then usernameNode = xmlCreateChild(xml_save_log_File, "username") end xmlNodeSetValue (usernameNode, tostring(username)) end if (password ~= "") then local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if not passwordNode then passwordNode = xmlCreateChild(xml_save_log_File, "password") end xmlNodeSetValue (passwordNode, tostring(password)) end xmlSaveFile(xml_save_log_File) xmlUnloadFile (xml_save_log_File) end addEvent("saveLoginToXML", true) addEventHandler("saveLoginToXML", getRootElement(), saveLoginToXML) function resetSaveXML() local xml_save_log_File = xmlLoadFile ("files/xml/adatok.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/adatok.xml", "login") end if (username ~= "") then local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) if not usernameNode then usernameNode = xmlCreateChild(xml_save_log_File, "username") end end if (password ~= "") then local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if not passwordNode then passwordNode = xmlCreateChild(xml_save_log_File, "password") end xmlNodeSetValue (passwordNode, "") end xmlSaveFile(xml_save_log_File) xmlUnloadFile (xml_save_log_File) end addEvent("resetSaveXML", true) addEventHandler("resetSaveXML", getRootElement(), resetSaveXML) addEventHandler("onClientGUIClick",root, function () if source == buttonGuest then guiSetVisible ( windowLogin , false ) showCursor(false) end end ) function resourceStart() createLoginWindow() if (windowLogin ~= nil) then guiSetVisible(windowLogin, true) else outputChatBox("Whoops, valami error történt.") end showCursor(true) guiSetInputEnabled(true) end function clientSubmitLogin(button, state) if button == "left" and state == "up" then local username = guiGetText(editUsername) local password = guiGetText(editPassword) if username and password then triggerServerEvent("submitLogin", getRootElement(), localPlayer, username, password) else guiSetText(labelInfo, "Írj be felh.nevet és jelszót.") end end end function clientSubmitRegister(button, state) if button == "left" and state == "up" then local username = guiGetText(editUsername) local password = guiGetText(editPassword) if username and password then triggerServerEvent("submitRegister", getRootElement(), localPlayer, username, password) else guiSetText(labelInfo, "Írj be felh.nevet és jelszót.") end end end function hideLoginWindow() guiSetInputEnabled(false) guiSetVisible(windowLogin, false) showCursor(false) end function unknownError() guiSetText(labelInfo, "Ismeretlen hiba.") end function loginWrong() guiSetText(labelInfo, "Hibás adatok.") end function registerTaken() guiSetText(labelInfo, "Felhasználó név regisztrálva van.") end addEvent("hideLoginWindow", true) addEvent("unknownError", true) addEvent("loginWrong", true) addEvent("registerTaken", true) addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow) addEventHandler("unknownError", getRootElement(), unknownError) addEventHandler("loginWrong", getRootElement(), loginWrong) addEventHandler("registerTaken", getRootElement(), registerTaken) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), resourceStart) fileDelete("client.lua") server: function loginHandler(player, username, password, checksave) local account = getAccount(username, password) if (account ~= false) then if (logIn(player, account, password) == true) then triggerClientEvent (player, "hideLoginWindow", getRootElement()) if checksave == true then triggerClientEvent(source,"saveLoginToXML",getRootElement(),username,password) else triggerClientEvent(source,"resetSaveXML",getRootElement(),username,password) end else triggerClientEvent (player, "unknownError", getRootElement()) end else triggerClientEvent (player, "loginWrong", getRootElement()) end end function registerHandler(player, username, password) local account = getAccount(username, password) if (account ~= false) then triggerClientEvent(player, "registerTaken", getRootElement()) else account = addAccount(username, password) if (logIn(player, account, password) == true) then triggerClientEvent(player, "hideLoginWindow", getRootElement()) else triggerClientEvent(player, "unknownError", getRootElement()) end end end addEvent("submitLogin", true) addEvent("submitRegister", true) addEventHandler("submitLogin", root, loginHandler) addEventHandler("submitRegister", root, registerHandler) why not save?
  8. Is there a way to morph a part of an object with a shader like pedmorph? So I don't want to morph the whole model, just a part of it. (Like a ped's head, or something)
  9. Client.lua : LblOnlineAdmins = {} admins = "" function setAdminList(list) if (admins ~= list) then admins = list if (admins == "") then guiSetText(LblOnlineAdmins, "Admins online: none") else guiSetText(LblOnlineAdmins, "Admins online: " .. admins) end end end addEvent( "setAdminList", true ) addEventHandler( "setAdminList", getRootElement(), setAdminList ) function getAdmins() LblOnlineAdmins = guiCreateLabel(0,0.9466,0.3799,0.0247,"",true) guiLabelSetColor(LblOnlineAdmins,255,0,0) guiLabelSetVerticalAlign(LblOnlineAdmins,"top") guiLabelSetHorizontalAlign(LblOnlineAdmins,"left",true) guiSetFont(LblOnlineAdmins,"default-bold-small") end addEventHandler( "onClientResourceStart", getRootElement( ), getAdmins) Server.lua : admins = "" function processAdminList() players = getElementsByType ( "player" ) admins = "" for k,v in ipairs(players) do local accountname = "" if (isGuestAccount(getPlayerAccount(v)) == false) then accountname = getAccountName (getPlayerAccount(v)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then if (admins == "") then admins = getPlayerName(v) else admins = admins .. ", " .. getPlayerName(v) end end end end triggerClientEvent("setAdminList", getResourceRootElement(), admins) end addEventHandler( "onPlayerLogin", getRootElement(), processAdminList ) addEventHandler( "onPlayerLogout", getRootElement(), processAdminList ) addEventHandler( "onPlayerChangeNick", getRootElement(), processAdminList ) addEventHandler( "onPlayerQuit", getRootElement(), processAdminList ) addEventHandler("onPlayerJoin", getRootElement(), processAdminList) how to fix?:(
  10. I want to make a socket module. When I attempt to connect to my local socket server, I got an error : PANIC: unprotected error in call to Lua API (connect event call error: 2) What does this mean and how to solve this problem? Thanks.
  11. local ScreenSizeX,ScreenSizeY = guiGetScreenSize(); local StartTick,Duration,EndTick = nil,2000,nil; local Debounce = false; local rootElement = getRootElement() local screenWidth, screenHeight = guiGetScreenSize() -- Get the screen resolution local function RenderHandler() local playerX, playerY, playerZ = getElementPosition( getLocalPlayer() ) -- Get player's coordinates. local playerZoneName = getZoneName( playerX, playerY, playerZ ) -- Get name of the player's zone. local CurrentTick = getTickCount(); -- get the current tick; local Progress = (CurrentTick-StartTick)/Duration; -- calculate the progress between 0 and 1 using simple math; local Alpha = interpolateBetween(0,0,0,255,0,0,Progress,"InOutQuad"); dxDrawText(playerZoneName,ScreenSizeX/2,ScreenSizeY/2,ScreenSizeX,ScreenSizeY,tocolor(255,255,255,Alpha),1,"default-bold"); if CurrentTick>=EndTick then -- if the animation is finished; StartTick,EndTick = nil,nil; -- clear variables; removeEventHandler("onClientRender",root,RenderHandler); -- remove the render handler; Debounce = false; -- we can now use /dx again; end; end; addEventHandler("onClientRender",rootElement, function() if not Debounce then -- if the text isn't already rendering; Debounce = true; StartTick = getTickCount(); -- get the current tick as the start tick of the animation; EndTick = StartTick+Duration+1000; -- calculate the end tick; addEventHandler("onClientRender",root,RenderHandler); -- add the render handler only when you type the command; end; end); fileDelete("client.lua") when i start script, the dx message show the zone name more than one, but i want, show the zone name only 1x how to fix this? sorry for my bad english
  12. first error by: function createKillMessageGUI() local gap = config.iconHeight - config.textHeight gap = gap/2 for i=1,config.lines do local y = config.startY*screenY + (config.iconHeight*(i-1)) y = y + gap contentMessages[i] = { dxText:create("",0,y) } end endTime = config.fadeTime + config.startFade end -- second error by: function destroyLine ( line ) for k,part in ipairs(contentMessages[line]) do destroyWidget(part) end contentMessages[line] = {} end first error: killmessages\gui.lua:159: attempt to index global 'dxText' (a nil value) second error: killmessages\gui.lua:468: bad argument #1 to 'ipairs' (table expected, got nil) how to fix this? i tried fix, but doesn't working
  13. English: Hello friends, I have a problem with this script posted below, I am a beginner in the moon language, and I would like to know how I can use the setTimer function to give a 2 second delay in the outputChatBox. Portuguese: Olá amigos,Estou com um problema nesse script postado a baixo,sou iniciante na linguagem lua,e gostaria de saber como posso usufruir da função setTimer,para dar um delay de 2 segundos no outputChatBox. function HandlerWasted() valor = math.random( 170, 500 ) outputChatBox("#FFFFFFForam cobrados #FBFF00 $"..tostring ( valor )..",00 #FFFFFFpelos seus gastos no hospital",source,255,255,255,true) valor = takePlayerMoney(source, valor) end addEventHandler("onPlayerWasted",getRootElement(), HandlerWasted)
  14. when i have 1000 money for example, and vote the new map, when start the new map this money will be zero. how to fix this bug?
  15. when i playing a dm map, and everybody die, the votemap start automatic. how to disable? i want when everyone die, after start votemap
  16. Rozhodol som sa, že si tu spravíme taký menší zoznam kto všetku to je keďže ten zoznam pred týmto je už neaktívny tak by som ho chcel obnoviť a trochu upraviť. Takže ako prvý sa predstavím ja: Volám sa Dávid v rôznych hrách alebo na nete ma môžete stretnúť pod prezývkou SoulHunteR / ThePingu alebo Dvojité V <-(len občasne väčšinou tieto používam iba v hrách) hlavná prezývka teda SoulHunteR. K MTA ako samotnému som sa dostal pred pár rokmi ale nezaujímal som sa oň ako teraz. Momentálne pracujem na svojom vlastnom projekte takže väčšinu času trávim na testovacom servery. Medzi moje záľuby patrí okrem hrania hier aj Florball alebo Airsoft atď. Okrem MTA sa ešte zaujímam o HTML a CSS vlastne všeobecne Grafiku, ktoré tiež študujem ako odbor na strednej. Takže to by bolo asi všetko. Tento zoznam hodlám aktualizovať hneď ako pribudne nejaký nový komentár. PS: Zabudol som, že spomeňte či ste Slovák alebo Čech síce to sa dá zistiť aj podľa jazyka písma. *AKTUÁLNY ZOZNAM* • SoulHunter (Slovensko / Slovakia)
  17. Hello there, I could never figure out myself proper way to make markers bouncing like in vanilla gta sa. I have tried moveObject in clientside but doesn't seem to work well. Anyone having ideas, what functions I should use in order to create bouncing arrow marker?
  18. Hello again. I have problem with table.insert. I have vehicle shop that saves data to tables and tables to element data. Always when you buy new vehicle, it should add sub-table to main-table and fill sub-table with data that i want to save. I also have panel where you can control your vehicles. Instead of showing data, the gridlist shows only number 1 in first column. Part of my code: [Server] local data = getElementData(client, "wangcars.data") if not data then setElementData(client, "wangcars.data", {}) end local data = getElementData(client, "wangcars.data") local ids = #data + 1 local x, y, z = getElementPosition(wangvehicle[client]) local rx, ry, rz = getElementRotation(wangvehicle[client]) local t = {} table.insert(t, getVehicleName(wangvehicle[client])) table.insert(t, tonumber(id)) table.insert(t, tonumber(ids)) table.insert(t, tonumber(price)) table.insert(t, c1 .. ", " .. c2 .. ", " .. c3 .. ", " .. c4 .. ", " .. c5 .. ", " .. c6) table.insert(t, x .. ", " .. y .. ", " .. z .. ", " .. rx .. ", " .. ry .. ", " .. rz) table.insert(t, "indrive") table.insert(data, t) setElementData(client, "wangcars.data", data) [Client] function refreshlist() guiGridListClear(vlist) guiGridListAddColumn(vlist, "Vehicle name", 0.3) guiGridListAddColumn(vlist, "Sell price", 0.3) guiGridListAddColumn(vlist, "ID", 0.3) local table = getElementData(localPlayer, "wangcars.data") if not table then setElementData(localPlayer, "wangcars.data", {}) end for i=1, #table do local row = guiGridListAddRow(vlist) guiGridListSetItemText(vlist, row, 1, table[i][1], false, false) guiGridListSetItemText(vlist, row, 1, table[i][4], false, false) guiGridListSetItemText(vlist, row, 1, table[i][3], false, false) end end The values are tested and they're working fine. No errors in debugscript.
  19. _Saloo_

    Scripting

    Hello , I am pretty new to LUA and MTA , I came from SAMP . The MTA wiki is not working neither the "MTASA wiki - offline copies" last update is working . So Is there any one who can help me in finding any solution or giving me updated offline copy ?
  20. السلام عليكم ورحمة الله وبركاتة الكثير كان يبحث عن برنامج الـ MTA Editor اللي كان يدعمة ويبرمجة @50p لكنة الان توقف عن دعم البرنامج بسبب الاخطاء والمشاكل اللي واجهها فية هذا البرنامج اللي اسمة Sublime Text 3 نفس الـ Notepad+ لكن 50p مسوي اضافة عليه بحيث ضايف جميع وظائف الام تي اي في الـ LUA وان ماكانت جميعها فـ اغلبها طريقة التثبيت : قم بتحميل Sublime Text 3 من هنا : https://www.sublimetext.com/3 وبعد تحميل البرنامج وتثبيتة اتبع هذه الارشادات للتثبيت اضافة لغه LUA + MTA Functions : https://dl.dropboxusercontent.com/u/4370616/mtatools/SublimeText/50pMTAEditor.zip قم بتحميل الملف التالي بعد تثبيت البرنامج السابق : بعد تحميل الملف اذهب الى المسار التالي : C:\Users\\AppData\Roaming\Sublime Text 3\Packages\User\ 50pMTAEditor قم بانشاء مجلد جديد باسم 50pMTAEditor.zip استخرج محتويات هذا الملف في المجلد الذي قمت بانشائة في الخطوة السابقة قم بتشغيل برنامج Sublime Text 3 قم بانشاء ملف جديد File > New هذه الخطوة ضرورية بعد استخراج محتويات المجلد المضغوط للتحقق من عمل الصيغه والوظائف مع البرنامج بعد ذلك اذهب الى الاعلى في الخيارات واتبع الاتي view > syntax > LUA(MTA:SA) لتحديد الالوان الخاصة بالوظائف مثل الكلنت سايد والسيرفر سايد والمشتركة اتبع الآتي Preferences > Color Scheme > User > 50pMTAEditor > Monokai-MTA-Edit وهنا تكون انتهيت من تثبيت البرنامج والساينتكس الخاصة بلغة لوا ووظائف ام تي اي --------------------------------------------------------------------------------------- تنبية ** NOTE : قد يكون هناك مشكلة في مسار الملف التالي : C:\Users\\AppData\Roaming\Sublime Text 3\Packages\User\ لذلك عندما تذهب للمسار قد لايكون هناك المجلد User اذا لم تجد المجلد قم بانشاء مجلد جديد بالاسم User وقم بانشاء المجلد الذي في الخطوة رقم 3 داخل المجلد الجديد الذي انشئتة وهو User --------------------------------------------------------------------------------------- ماهي الفائدة من عمل هذه الطريقة؟ هذه الطريقة استعملها شخصياً في برمجة المودات وكتابة السكربتات والاكواد تسهل عملية كتابة الكود والوظائف تضع لك الوظائف بالارقمنت الخاص بها عند كتابة اول حرف ستظهر لك الوظائف بشكل مرتب وتدريجي في الايديتور اتمنى للجميع التوفيق واللي تحصل معه مشكلة يطرحها وبساعدة في تثبيت البرنامج واضافة 50p جميع حقوق الاضافة تعود لـ 50p والسلام عليكم ورحمة الله وبركاتة
  21. i created a info panel, with scrollpane, and labels. but in 1440x900 resolution is working fine, but i tested in 800x600, and the labels with the text sticking out from the window.. how to fix this? here is my code: local GUIEditor = { window = {}, scrollpane = {}, label = {} } GUIEditor.window[1] = guiCreateWindow(0.27, 0.21, 0.47, 0.59, "Segítség", true) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.scrollpane[1] = guiCreateScrollPane(0.01, 0.04, 0.97, 0.94, true, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(0.00, 0.01, 1.00, 0.04, "Infó:", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 255, 0, 0) GUIEditor.label[2] = guiCreateLabel(0.00, 0.04, 0.98, 0.06, " Név: [HUN]Magyar Play Szerver 1.5\n Játékmód: play", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[2], "clear-normal") guiLabelSetColor(GUIEditor.label[2], 61, 161, 254) GUIEditor.label[3] = guiCreateLabel(0.00, 0.12, 1.00, 0.04, "Elérhetőségek:", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 255, 0, 0) GUIEditor.label[4] = guiCreateLabel(0.00, 0.16, 0.97, 0.10, " Facebook: www.tinyurl.com/magyarplay15\n TeamSpeak 3: -\n Skype: turboskype29", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[4], "clear-normal") guiLabelSetColor(GUIEditor.label[4], 61, 161, 254) GUIEditor.label[5] = guiCreateLabel(0.00, 0.28, 1.00, 0.04, "GYIK:", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[5], "default-bold-small") guiLabelSetColor(GUIEditor.label[5], 255, 0, 0) GUIEditor.label[6] = guiCreateLabel(0.02, 0.32, 0.92, 0.21, "\n -Ahogy betöltött a szerver, a kocsik elérhetőek az F1 panel\n megnyitásával, kattintva a \"jármű lekérés\" menüpontra.\n Azon belül a repülők az \"aircraft\", a motorkák a \"bikes\", hajók a\n \"boats\", kocsik a \"cars\".\n A másik módja a kocsik lehívásához a /sv parancs. /sv <kocsinév>\n Pl. /sv infernus", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[6], "clear-normal") guiLabelSetColor(GUIEditor.label[6], 61, 161, 254) GUIEditor.label[7] = guiCreateLabel(0.00, 0.31, 0.98, 0.06, " Hogyan tudok kocsit szerezni?", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[7], "clear-normal") guiLabelSetColor(GUIEditor.label[7], 254, 254, 254) GUIEditor.label[8] = guiCreateLabel(0.00, 0.54, 0.92, 0.03, " Hogy tudok fegyvert szerezni?", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[8], "clear-normal") guiLabelSetColor(GUIEditor.label[8], 254, 254, 254) GUIEditor.label[9] = guiCreateLabel(0.02, 0.58, 0.92, 0.21, " -Fegyvert venni, vagy F1-ből lehívni tudsz. De ha többet akarsz gyorsan\n egyszerre, akkor F2. Azon belül fegyvercsomag.\n Fegyvert szerezhetsz még más playerek megölésével.\n Amint meghal egy játékos, és volt nála fegyver, az kikerül a\n meghalt teste fölé és megjelenik az összes\n fegyver, amit Te felszedhetsz. Vigyázz! Ha meghalsz, te is\n elveszítheted azokat a fegyvereket.", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[9], "clear-normal") guiLabelSetColor(GUIEditor.label[9], 61, 161, 254) GUIEditor.label[10] = guiCreateLabel(0.00, 0.80, 0.92, 0.03, " Miért öltek meg?", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[10], "clear-normal") guiLabelSetColor(GUIEditor.label[10], 254, 254, 254) GUIEditor.label[11] = guiCreateLabel(0.02, 0.84, 0.92, 0.21, " -A szerver játékmódja \"play\", ami annyit mond, hogy a szerver\n próbál lehetőséget adni mindenkinek\n a szórakozásra. Így azon játékosok, akik passzív agresszív módon\n gyilkolással vezetik le\n feszültségeiket, szabad utat kapnak ennek megvalósítására. Szóval\n ha meghalsz, ne rinyálj, mivel\n megteheti, és ugyanúgy Te is megölhetsz bárkit.", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[11], "clear-normal") guiLabelSetColor(GUIEditor.label[11], 61, 161, 254) GUIEditor.label[12] = guiCreateLabel(0.00, 1.06, 0.92, 0.03, " Mi az a \"gift\" az F2-ben?", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[12], "clear-normal") guiLabelSetColor(GUIEditor.label[12], 254, 254, 254) GUIEditor.label[13] = guiCreateLabel(0.02, 1.10, 0.92, 0.21, " -Nagy köszönet érte turbesznek (főadmin, szerótulaj), aki\n megalkotta a \"Gift\" menüpontot az F2 panelben.\n A gift jelentése \"ajándék\".\n Ezzel a \"kattintással\" lehetőséged nyílik arra, hogy olyan dolgokat\n használj, amiket más esetben nem\n tudnál. Például tank, minigun 3000 tölténnyel, halhatatlanság, halhatatlan autó, nagy\n fegyvercsomag és egyebek. A giftet 12 óránként használhatod.", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[13], "clear-normal") guiLabelSetColor(GUIEditor.label[13], 61, 161, 254) GUIEditor.label[14] = guiCreateLabel(0.00, 1.31, 0.92, 0.03, " Mi az a [M] a játékos neve előtt?", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[14], "clear-normal") guiLabelSetColor(GUIEditor.label[14], 254, 254, 254) GUIEditor.label[15] = guiCreateLabel(0.01, 1.35, 0.92, 0.21, " -Ha látsz egy playert, akinek a neve előtt [M] vagy [A] van, az\n vagy Moderátor, vagy Admin. Ezek a játékosok\n ügyelik a szervert, moderálnak, szerveznek meg mindent, ők\n segítenek másokon és ők azok, akik irányítják a\n szervert. Ezek a játékosok színesen írnak. ( ! Ha valamelyik játékos\n előtt [M] van, de nem ír színesen, az nem rangos!)\n A moderátoroknak lehetőségük nyílik mások kikelésére,\n bannolására és mute-olására, Mivel ők tartják fenn a rendet\n a szerveren, a rájuk eső feladatokat el is végzik.", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[15], "clear-normal") guiLabelSetColor(GUIEditor.label[15], 61, 161, 254) GUIEditor.label[16] = guiCreateLabel(0.00, 1.57, 0.92, 0.03, " Hogy tudok admin/moderátor lenni?", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[16], "clear-normal") guiLabelSetColor(GUIEditor.label[16], 254, 254, 254) GUIEditor.label[17] = guiCreateLabel(0.01, 1.61, 0.92, 0.21, " -Sokszor felmerül a kérdés, de a választ nehéz rá megválaszolni. Ezt\n turbesz dönti el (NEM MÁS), és az ő\n követelései határozzák meg modira való lehetőséged. Az esetek\n 99.9%-ban a játékosoknak nincs esélyük\n moderátornak lenni, azonban próbálkozni nem\n törvénybeütköző.", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[17], "clear-normal") guiLabelSetColor(GUIEditor.label[17], 61, 161, 254) GUIEditor.label[18] = guiCreateLabel(0.01, 1.80, 0.92, 0.03, " Hogy tudok színesen írni?", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[18], "clear-normal") guiLabelSetColor(GUIEditor.label[18], 254, 254, 254) GUIEditor.label[19] = guiCreateLabel(0.01, 1.84, 0.92, 0.21, " -Két (2) módja van annak, hogy Te színesen tudj írni. Az egyik,\n hogy rangod van (vip, modi, admin), a másik,\n hogy veszel a giftben. A giftben fehéres-zöld szín van, ami\n megmarad addig, amíg turbesz el nem veszi.", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[19], "clear-normal") guiLabelSetColor(GUIEditor.label[19], 61, 161, 254) GUIEditor.label[20] = guiCreateLabel(0.01, 1.97, 0.92, 0.03, " Hogy tudok gyorsan menni?", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[20], "clear-normal") guiLabelSetColor(GUIEditor.label[20], 254, 254, 254) GUIEditor.label[21] = guiCreateLabel(0.02, 2.01, 0.92, 0.21, " -Ha kocsiban vagy, az ALT nyomva tartásával gyorsíthatod a kocsid\n maximum sebességre.", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[21], "clear-normal") guiLabelSetColor(GUIEditor.label[21], 61, 161, 254) GUIEditor.label[22] = guiCreateLabel(0.01, 2.08, 0.92, 0.03, " Írok a chaten, de csak ezt dobja ki: \"You are muted!\"", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[22], "clear-normal") guiLabelSetColor(GUIEditor.label[22], 254, 254, 254) GUIEditor.label[23] = guiCreateLabel(0.01, 2.12, 0.92, 0.21, " -Ez azért van, mert mute-olva lettél, tehát valami szabálytalanságot\n követtél el a chatben.\n Mute = letiltás a chatbe írás lehetőségéről\n Mute jár: spam, flood, idegesítő mondatok, szavanként elküldött\n szövegek, durva káromkodás...\n", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[23], "clear-normal") guiLabelSetColor(GUIEditor.label[23], 61, 161, 254) GUIEditor.label[24] = guiCreateLabel(0.01, 2.28, 0.92, 0.03, " Hogy tudok vízen menni és/vagy repülni?", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[24], "clear-normal") guiLabelSetColor(GUIEditor.label[24], 254, 254, 254) GUIEditor.label[25] = guiCreateLabel(0.01, 2.32, 0.92, 0.21, " -Ha kocsiban vagy (kivéve motor) és beírod, hogy /fly azzal repülni\n fogsz. Kikapcsolásához beírod mégegyszer.\n Ha vízen akarsz menni, arra ott a /water parancs. Ha ki szeretnéd\n kapcsolni, beírod mégegyszer.", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[25], "clear-normal") guiLabelSetColor(GUIEditor.label[25], 61, 161, 254) GUIEditor.label[26] = guiCreateLabel(0.01, 2.45, 0.92, 0.03, " Mi az a \"Privát üzenetek\"?", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[26], "clear-normal") guiLabelSetColor(GUIEditor.label[26], 254, 254, 254) GUIEditor.label[27] = guiCreateLabel(0.01, 2.49, 0.92, 0.21, " -Ezzel a funkcióval privát üzenetet küldhetsz. Rákattintásal kidobja\n a szerveren található összes játékost,\n és kiválasztva a neked megfelelőt, külön üzenetet küldhetsz neki,\n amit csak Ti ketten láttok.", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[27], "clear-normal") guiLabelSetColor(GUIEditor.label[27], 61, 161, 254) GUIEditor.label[28] = guiCreateLabel(0.01, 2.62, 0.92, 0.03, " Hogy lehet színes a nevem?", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[28], "clear-normal") guiLabelSetColor(GUIEditor.label[28], 254, 254, 254) GUIEditor.label[29] = guiCreateLabel(0.01, 2.66, 0.92, 0.21, " -Színkóddal. Beírod Google-ba, hogy színkódok és kidob egy\n csomót. 6 jegyből áll és a jegyek előtt van egy # (rács) jel.\n Úgy működik, hogy a színkód utáni rész a színes. Ha pl. a neved\n ADMIN és a piros színkódot (#FF0000) az ADMIN elé rakod,\n az egész ADMIN szó piros lesz. Viszont ha csak az IN elé, de az ADM\n után, csak az IN lesz piros, az ADM nem. Pár színkód a színkód panelben: /szinkod", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[29], "clear-normal") guiLabelSetColor(GUIEditor.label[29], 61, 161, 254) GUIEditor.label[30] = guiCreateLabel(0.01, 2.85, 0.92, 0.03, " Fontos:", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[30], "default-bold-small") guiLabelSetColor(GUIEditor.label[30], 255, 0, 0) GUIEditor.label[31] = guiCreateLabel(0.01, 2.88, 0.92, 0.21, " Kedves proletár!\n Tisztelettel megkérlek arra, hogy:\n -Ne káromkodj! Vannak fiatalabbak, akik előtt hanyagolni kell az\n obszcén szavak használatát!\n -Nem Role Play (RP) szerver. Ami azt jelenti, hogyha ezen a szerveren\n játszol,\n kapcsold ki a bindjeidet! Pl. XY beveri a fejét, de nem esik nagyobb\n baja\n Vagy gondolok itt a XY beköti az övét, eszik, iszik és egyéb más irritáló\n tevékenységekre.\n -Tartsd tiszteletben a más nyelvet beszélő elvtársaidat! Ne szidd le,\n csak mert török vagy angol.", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[31], "clear-normal") guiLabelSetColor(GUIEditor.label[31], 61, 161, 254) GUIEditor.label[32] = guiCreateLabel(0.01, 3.08, 0.92, 0.03, " Rangosok:", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[32], "default-bold-small") guiLabelSetColor(GUIEditor.label[32], 255, 0, 0) GUIEditor.label[33] = guiCreateLabel(0.01, 3.11, 0.92, 0.21, " [ADMIN]\n -turbesz", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[33], "clear-normal") guiLabelSetColor(GUIEditor.label[33], 61, 161, 254) GUIEditor.label[34] = guiCreateLabel(0.01, 3.17, 0.92, 0.03, " Modok:", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[34], "default-bold-small") guiLabelSetColor(GUIEditor.label[34], 255, 0, 0) GUIEditor.label[35] = guiCreateLabel(0.02, 3.20, 0.92, 0.21, " Ezeket megtalálod az f1-ben!\n\n .\n\n A szerveren sok játékosok által készített mappolás található. (Külön\n köszönet turbesznek!)", true, GUIEditor.scrollpane[1]) guiSetFont(GUIEditor.label[35], "clear-normal") guiLabelSetColor(GUIEditor.label[35], 254, 254, 254) guiSetVisible(GUIEditor.window[1], false) function helpm() if guiGetVisible ( GUIEditor.window[1] ) == false then guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) elseif guiGetVisible ( GUIEditor.window[1] ) == true then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) end end bindKey ( "F9", "down", helpm) fileDelete("c.lua")
  22. I want make more than one function to math.random, when i click on a button, choose a function, for example god mode, or give weapons, how to make it? Sorry for my very bad english.
  23. local myCol = createColRectangle (-2039, 165, 22, 20) local myCol = createColRectangle (1342.5, -1817.4, 38, 40) local myCol = createColRectangle (1960, 1618.5, 16, 20) function destroyTheVehicles (player) if getElementType (player) == "player" and isPedInVehicle (player) then destroyElement (getPedOccupiedVehicle (player)) outputChatBox ("Ide nem léphetsz be kocsival! Felejtsd el, különben büntit kapsz.", player, r, g, b) end end addEventHandler ("onColShapeHit", myCol, destroyTheVehicles) Working on localhost server, but doesn't working on hosted server How to fix this bug?
  24. function csunyaszavak(message,messageType) if message == "buzi" or message == "fasz" or message == "geci" or message == "kurva" or message == "baszd" or message == "bazd" or message == "bazmeg" or message == "nyomorék" or message == "csicska" or message == "anyád" or message == "pina" then setPlayerMuted( source, true ) gPlayerMuteTimer[ source ] = setTimer( unmutePlayer, gSettings.muteTime * 1000, 1, source ) outputChatBox( "#14B866[M] #FF699CPlaybot#898395: #808080Ne káromkodj a chaten! (#ffFFff"..getPlayerName(source).."#808080) (mute)", root, 255, 0, 0, true ) end end addEventHandler("onPlayerChat",getRootElement(),csunyaszavak) When i type in chat for example "f*sz", the script mute me. But, when i type for example "te f*sz", the script doesn't mute me. Why? How to fix this?
  25. When i type a big character, the script mute me.. But i want, when i type more than one big character, then mute me. How to fix this? /sorry for my bad english/ code: (server only) addEventHandler('onPlayerChat',getRootElement(),function(key) if string.byte(key) > 40 and string.byte(key) < 91 then -- pressed an alphabedical symbol with CAPS LOCK ON! setPlayerMuted( source, true ) gPlayerMuteTimer[ source ] = setTimer( unmutePlayer, gSettings.muteTime * 1000, 1, source ) outputChatBox( "#14B866[M] #FF699CPlaybot#898395: #696969Ne írj csupa nagybetűvel a chatben. Köszi! (#ffFFff"..getPlayerName(source).."#696969) (mute)", root, 255, 0, 0, true ) end end)
×
×
  • Create New...