Jump to content

Search the Community

Showing results for tags 'not'.

  • 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. client side: server side: c.lua:5: attempt to concatenate local amount
  2. i created a dx panel, and i created some onClientClick event for this panel. but when i hide the panel, the onClientClick events are working.. how to fix this?
  3. code: addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() exports [ "scoreboard" ]:addScoreboardColumn ( "Jármű:", 3 ) end ) setTimer ( function ( ) local players = getElementsByType "player" for k, v in ipairs ( players ) do if ( isPedInVehicle(v) ) then local vehicle = getPedOccupiedVehicle(v) local carname = getVehicleName(vehicle) setElementData ( v, "Jármű:", tostring(carname) ) else setElementData ( v, "Jármű:", "Nincs") end end end, 2500, 0 ) and i get this error: ERROR: Loading script failed: xy/xy.lua:1: unexpected symbol near '?' how to fix this?
  4. local start = getTickCount() local one, one1 = -300, 604 local two, two1 = 0, 604 local screenW, screenH = guiGetScreenSize() local text = "" local pic = "j" function draw() local x,y = interpolateBetween(one, one1, 0, two, two1, 0, (now - start) / ((start + 1500) - start), "Linear") local now = getTickCount() dxDrawRectangle(x,y, screenW * 0.2306, screenH * 0.0356, tocolor(0, 0, 0, 130), false) dxDrawText(" * "..text, x, y, screenW * 0.2340, screenH * 0.7044, tocolor(255, 255, 255, 255), 1.00, "default", "left", "center", false, false, false, true, false) end addEventHandler("onClientPlayerChangeNick", root, function(oldName, newName) addEventHandler("onClientRender", root,draw) text = string.format("#%02X%02X%02X", getPlayerNametagColor(source)) .. oldName .. " #FFffFFneve mostantól " .. string.format("#%02X%02X%02X", getPlayerNametagColor(source)) .. newName .. "" pic = "c" setTimer ( function() removeEventHandler("onClientRender", root, draw) end, 5000, 1 ) end ) this is my code. the dx things are working, just the animation does not working how to fix? sorry for my very bad english :C
  5. i have this code: setTimer(function() local arfolyam = math.random(200,5130) outputChatBox("Jelenlegi árfolyam: "..arfolyam) end, 500, 0) GUIEditor.window[1] = guiCreateWindow(0.35, 0.31, 0.31, 0.28, "Aranykereskedés", true) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(0.02, 0.59, 0.95, 0.14, "Az arany jelenlegi árfolyama: "..arfolyam, true, GUIEditor.window[1]) but i get this error in debugscript 3: attempt to concatenate global 'arfolyam' ( a nil value) what wrong? how to fix this?
  6. I created a Brown Streak mod. And the dff&txd working fine, but the .col does not working. I got a warning in debugscript 3: mod.lua:14: Bad 'number' pointer @ engineReplaceCOL'(2) This is the mod.lua code: function replaceModel() local txd colsok = engineLoadCOL ( "v43.col" ) engineReplaceCOL ( colsok, 538) txd = engineLoadTXD ( "v43.txd" ) engineImportTXD ( txd, 538 ) dff = engineLoadDFF ( "v43.dff" ) engineReplaceModel ( dff, 538 ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler ( "reloadcar", replaceModel ) What wrong? How to fix this?
  7. SERVER DISCONTINUED Introduction San Fierro Roleplay was founded in mid 2016 by Fernando and TheNeonGuy. The community has been active since then and is growing quite fast thanks to the popular platform Discord that keeps us all united. Server IP Address 62.210.220.180 About Us Our goal is to provide the best roleplay experience (yes ik this is what they all say) in this set location, the beautiful city of San Fierro, plenty of unique and varied opportunities for all types of roleplayers. We have hired many hard-working yet very loyal staff members to fullfill positions within the Administration and Help teams as well as the Development team led by Forthwind. We offer many unique features not only from the ogscript that we tremendously edited but also a vast amount of NEW and unique scripts such as: • A completely different death system inspired by a few SAMP roleplay servers • A few more government jobs such as Truck Driver and Tram Operator in San Fierro • A majority of the jobs the city hall has to offer were improved, customized and new features were added to them • A different yet great account system & management, and login panel • An unique set of factions designed appropriately for San Fierro with set location headquarters, vehicles, custom skins and unique perks! San Fierro Police Department, San Fierro Fire Department, Government, News, a Towing company and a lot more! • A bunch of not Pay2Win new donator features and perks were added to its menu! • A script that allows you to submit a custom interior / exterior map was created and is going to be implemented! • An elevator script that allows you to head to certain floors in tall buildings. • Weapon body-attachment is now for everyone; fixed and improved! • Custom mini-map radar with street names for the entire map available for everyone at no cost! • Gas stations revamped! • FedEx is your favorite delivery company at your service! • New bus routes throughout San Fierro, connecting and moving the people! • Improved certain actions such as getting tased or being projected out of a car's windshield upon collision by adding automatic /ame for logging purposes. • Brand new working log-system that admins can access in-game; No more lying and faking evidence! • Cool tags and icons added and revamped for you to use in-game at the cost of a few GameCoins. AND A LOT MORE! Media Screenshots coming very soon! Stay Connected Screenshots coming very soon! Want to know more about the server that's coming very soon? Stay tuned by being apart of our Discord community where we post daily regular updates! Link: removed Keep up with the server's develpmont on the Trello platform below. Link: removed
  8. local screenWidth, screenHeight = guiGetScreenSize() GUIEditor = { button = {} } addEventHandler("onClientResourceStart", resourceRoot, function showgui() if (vehicle) then GUIEditor.button[1] = guiCreateButton(981, 627, 39, 40, "1", false) guiSetAlpha(GUIEditor.button[1], 0.00) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF") GUIEditor.button[2] = guiCreateButton(1025, 627, 39, 40, "2", false) guiSetAlpha(GUIEditor.button[2], 0.00) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFFFFFF") GUIEditor.button[3] = guiCreateButton(981, 673, 39, 40, "4", false) guiSetAlpha(GUIEditor.button[3], 0.00) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFFFFFF") GUIEditor.button[4] = guiCreateButton(1025, 673, 39, 40, "5", false) guiSetAlpha(GUIEditor.button[4], 0.00) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFFFF") GUIEditor.button[5] = guiCreateButton(1069, 673, 39, 40, "6", false) guiSetAlpha(GUIEditor.button[5], 0.00) guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFFFFFFF") GUIEditor.button[6] = guiCreateButton(1069, 719, 39, 40, "9", false) guiSetAlpha(GUIEditor.button[6], 0.00) guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFFFFFF") GUIEditor.button[7] = guiCreateButton(1025, 719, 39, 40, "8", false) guiSetAlpha(GUIEditor.button[7], 0.00) guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFFFFFFF") GUIEditor.button[8] = guiCreateButton(981, 719, 39, 40, "7", false) guiSetAlpha(GUIEditor.button[8], 0.00) guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FFFFFFFF") GUIEditor.button[9] = guiCreateButton(1025, 765, 39, 40, "0", false) guiSetAlpha(GUIEditor.button[9], 0.00) guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFFFFFFF") GUIEditor.button[10] = guiCreateButton(892, 573, 39, 40, "CLEAR", false) guiSetAlpha(GUIEditor.button[10], 0.00) guiSetProperty(GUIEditor.button[10], "NormalTextColour", "FFF70000") GUIEditor.button[11] = guiCreateButton(892, 627, 39, 40, "DEMO", false) guiSetAlpha(GUIEditor.button[11], 0.00) guiSetProperty(GUIEditor.button[11], "NormalTextColour", "FF66F92C") GUIEditor.button[12] = guiCreateButton(892, 673, 39, 40, "AM", false) guiSetAlpha(GUIEditor.button[12], 0.00) guiSetProperty(GUIEditor.button[12], "NormalTextColour", "FFE7E53D") GUIEditor.button[13] = guiCreateButton(892, 719, 39, 40, "PM", false) guiSetAlpha(GUIEditor.button[13], 0.00) guiSetProperty(GUIEditor.button[13], "NormalTextColour", "FF8D9096") GUIEditor.button[14] = guiCreateButton(892, 765, 39, 40, "ENTER", false) guiSetAlpha(GUIEditor.button[14], 0.00) guiSetProperty(GUIEditor.button[14], "NormalTextColour", "FF3F4145") GUIEditor.button[15] = guiCreateButton(981, 765, 39, 40, "-", false) guiSetAlpha(GUIEditor.button[15], 0.27) guiSetProperty(GUIEditor.button[15], "NormalTextColour", "FFFFFFFF") GUIEditor.button[16] = guiCreateButton(1069, 627, 39, 40, "3", false) guiSetAlpha(GUIEditor.button[16], 0.00) guiSetProperty(GUIEditor.button[16], "NormalTextColour", "FFFFFFFF") GUIEditor.edit[1] = guiCreateEdit(951, 575, 192, 32, "MM-DD-YYYY-HH-MM-AMPM", false) guiSetProperty(GUIEditor.edit[1], "NormalTextColour", "FF000100") guiEditSetMaxLength ( GUIEditor.edit[1], 21 ) end ) local dxfont0_BTTF = dxCreateFont("fonts/BTTF.ttf", 10) addEventHandler("onClientRender", root, function showgui() if (vehicle) then dxDrawImage(444, 559, 433, 269, "images/time_circuits.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("By: CsaliHUN", 745 - 1, 810 - 1, 873 - 1, 828 - 1, tocolor(0, 0, 0, 255), 1.00, dxfont0_BTTF, "center", "center", false, false, false, false, false) dxDrawText("By: CsaliHUN", 745 + 1, 810 - 1, 873 + 1, 828 - 1, tocolor(0, 0, 0, 255), 1.00, dxfont0_BTTF, "center", "center", false, false, false, false, false) dxDrawText("By: CsaliHUN", 745 - 1, 810 + 1, 873 - 1, 828 + 1, tocolor(0, 0, 0, 255), 1.00, dxfont0_BTTF, "center", "center", false, false, false, false, false) dxDrawText("By: CsaliHUN", 745 + 1, 810 + 1, 873 + 1, 828 + 1, tocolor(0, 0, 0, 255), 1.00, dxfont0_BTTF, "center", "center", false, false, false, false, false) dxDrawText("By: CsaliHUN", 745, 810, 873, 828, tocolor(246, 92, 8, 255), 1.00, dxfont0_BTTF, "center", "center", false, false, false, false, false) dxDrawImage(878, 557, 275, 271, "images/buttons.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("", 951, 575, 1143, 607, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end ) addEventHandler ( "onClientGUIClick", GUIEditor.button[16], outputEditBox, false ) function outputEditBox ( button ) if button == "left" then local text = guiGetText ( GUIEditor.edit[1] ) outputChatBox("Uticél beállítva:",player,255,69,0) outputChatBox (( text ),player,255,69,0) outputChatBox("Érd el a 88 km/h sebességet az utazáshoz!",player,255,69,0) end end addEventHandler("onClientRender", root, showgui) addCommandHandler ( "bttf", showgui ) function HandleTheRendering ( ) addEventHandler("onClientRender", root, renderDisplay) end addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering) SORRY FOR BAD ENGLISH Please help me, I made a GUI, that needs to show on when I enter a Tampa , but it didn't show on. And also can someone help me to make that if i click on a button it will write something to an edit box, then if i click on an other button it will send it to local chat. ((The buttons alpha = 0 because there's a picture behind them))
  9. local titles = { "AdminSegéd", "Moderátor", "SzuperModerátor", "Admin", "FőAdmin", "Tulajdonos", "Fejlesztő" } function getPlayerAdminTitle() local text = titles if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then text = "Tulajdonos" elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("FoAdmin")) then text = "FőAdmin" elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Adminseged")) then text = "AdminSegéd" elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("KisAdmin")) then text = "Admin" elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Fejleszto")) then text = "Fejlesztő" elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then text = "Moderátor" end end function getFixedName(player) if isElement(player) then local hisName = getPlayerName(player) if hisName then result = string.gsub(hisName, '#%x%x%x%x%x%x', '') if result then return result end end end end function adminuzi(thePlayer, commandName, ...) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) or isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("FoAdmin")) or isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Adminseged")) or isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("KisAdmin")) or isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Fejleszto")) or isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Moderator")) then if not (...) then outputChatBox("#00FF7F[Használat]:#FFFFFF /".. commandName .." [üzenet]", thePlayer, 0, 206, 209,true) else local adminrang = getPlayerAdminTitle(thePlayer) message = table.concat({...}, " ") local playerName = getFixedName ( thePlayer ) outputChatBox("#0088FF[SUPERFUN-Admin]#d8001f "..playerName..": "..message,getRootElement(),0,0,0,true) end end end addCommandHandler("asay", adminuzi, false, false) i have this script, and i get this warnings/error: How to fix this?
  10. I'm using guieditor 3.1.3. When I try to do Main Menu > Output after loading GUI code, the Output window doesn't open.
  11. Well, this is recent, it was working fine, but now it stopped working, any solution? (arguments are right) no error in debug !
  12. i have this script, and does not update online players number, why? local online = #getElementsByType("player") local messagesList = { online.."/30", "SF", } local currentMessage = 0 addEventHandler("onClientPreRender", getRootElement(), function() local online = #getElementsByType("player") dxDrawText(messagesList[currentMessage + 1], screenW * 0.6014+3, screenH * 0.9656+3, screenW * 0.6556, screenH * 0.9978, tocolor(0, 0, 0, 255), 2.20, "default-bold", "center", "bottom", false, false, false, false, false) dxDrawText(messagesList[currentMessage + 1], screenW * 0.6014, screenH * 0.9656, screenW * 0.6556, screenH * 0.9978, tocolor(255, 255, 255, 255), 2.20, "default-bold", "center", "bottom", false, false, false, false, false) end ) function updateMessage() if (currentMessage == 1) then currentMessage = 0 else currentMessage = currentMessage + 1 end end setTimer(updateMessage, 2000, 0)
  13. Why not working this notification system? Client side: local notifications = {} function createNotification(text2, typ, name1, name2) if typ == "simple" then text = name1.." "..text2 data = { text = text, startTime = getTickCount(), endTime = getTickCount() + 10000 } elseif typ == "duble" then text = name1.." "..text2.." "..name2 data = { text = text, startTime = getTickCount(), endTime = getTickCount() + 10000 } end table.insert(notifications, data) end addEvent( "createNotification", true ) addEventHandler( "createNotification", localPlayer, createNotification ) Server side: addEventHandler('onClientPlayerChangeNick', root, function(oldNick, newNick, text2, typ, name1, name2) triggerServerEvent ("createNotification", root, text2, typ, name1, name2) end ) How to fix this problem in this script? Thanks the help!
  14. local screenW, screenH = guiGetScreenSize() function ahudd() dxDrawImage(screenW * 0.8424, screenH * 0.6289, screenW * 0.1194, screenH * 0.0256, "nbgg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(screenW * 0.8444, screenH * 0.6322, screenW * 0.1153, screenH * 0.0189, "nn.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Jármű épség:", (screenW * 0.8424) + 1, (screenH * 0.6289) + 1, (screenW * 0.9618) + 1, (screenH * 0.6544) + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Jármű épség:", screenW * 0.8424, screenH * 0.6289, screenW * 0.9618, screenH * 0.6544, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) end function asdxd() local playerVehicle = getPedOccupiedVehicle ( localPlayer ) if playerVehicle then local vehicleHealth = getElementHealth ( playerVehicle ) / 10 addEventHandler("onClientRender", root, ahudd) else removeEventHandler("onClientRender", root, ahudd) end end addEventHandler("onClientRender", root, asdxd) fileDelete("client.lua") why not working? i want, when the player get in a vehicle, show the dx element, and when get out, hide the dx element, and if player in a vehicle, the dx element show just for her
  15. local countdown = 120 G3 = guiCreateLabel(0.49, 0.67, 0.03, 0.02, tostring(countdown).." mp", true) guiSetFont(G3, "default-bold-small") guiSetVisible(G3,false) addEventHandler("onClientGUIClick",root, function () if source == buttonGuest then removeEventHandler("onClientRender",root,a123) addEventHandler("onClientRender", root, dxhavendeg) guiSetVisible(buttonLogin,false) guiSetVisible(buttonRegister,false) guiSetVisible(buttonGuest,false) guiSetVisible(editPassword,false) guiSetVisible(editUsername,false) setTimer(function () countdown = countdown - 1 if countdown >= 0 then guiSetText(G3, tostring(countdown)) else outputChatBox("asd") end end, 120000, 1000) end end ) what wrong?
  16. client: function asdasd111() removeEventHandler("onClientRender",root,a123) guiSetVisible(buttonLogin,false) guiSetVisible(buttonRegister,false) guiSetVisible(buttonGuest,false) guiSetVisible(editPassword,false) guiSetVisible(editUsername,false) guiSetVisible(G1,false) guiSetVisible(G2,false) showCursor(false) end addEvent ( "onClientPlayerLogin", true ) addEventHandler ( "onClientPlayerLogin", root, asdasd111 ) server: function triggerLogin ( player, username, password ) triggerClientEvent ( player, "onClientPlayerLogin", player, username, password ) end what wrong?
  17. i added DD maps, but doesn't working.. when i connect the server, show votemanager, i vote for example 7, and the map does not start.. Why? -.-
  18. function buyWeapon(thePlayer, command) local mycoins = exports.coinsystem:getPlayerCoin(thePlayer) if (mycoins >= 1) then giveWeapon(thePlayer, 31, 2000) exports.coinsystem:takePlayerCoin(thePlayer, prize) outputChatBox("you bought a M4.", thePlayer, 0, 255, 0, false) else outputChatBox("you don't have enough coins!", thePlayer, 255, 0, 0, false) end end addCommandHandler("buyw", buyWeapon) i got this error: xy.lua:17: attempt to compare number with nil
  19. function someName(killer,weapon,bodypart) if(killer == getLocalPlayer()) then return end if bodypart == 9 then local sound = playSound("headshot.mp3",false) end end addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), someName ) fileDelete("client.lua") what wrong?
  20. colShape = createColCuboid( -2061.63379, 1096.16113, 53, 30.0, 25.0, 25.0 ) addEventHandler( "onColShapeHit", colShape, function( hitElement, dimension, thePlayer ) if not ( dimension ) then return false end if( isElement( hitElement) and getElementType( hitElement ) == "player" ) then local accName = getAccountName ( getPlayerAccount ( hitElement ) ) if not( isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) ) then local veh = getPedOccupiedVehicle(thePlayer) if (veh) then setElementPosition(veh, -2052.28589, 1087.36926, 55.71875 ) else setElementPosition(thePlayer, -2052.28589, 1087.36926, 55.71875 ) end outputChatBox("#FFffFFTe ide nem jöhetsz be! Ki lettél rugva a helyről.", thePlayer, 255, 255, 255, true) end end end) what wrong?
  21. Good evening fellows, Recently, I've been trying to find the rotation of one part or side of a random object but I couldn't really find the function or the way to do so therefore I'm stuck. If you did not understand the idea, I'll explain it below; A cube is made of 6 sides or faces, generally in MTA if we have an object with a shape of cube or any other shape, we can get its rotation by just using getElementRotation. But, if we want to get the rotation of one face of its faces it is only possible with couple mathmatic calculations which is a bit complicated when this object is on the form of a cube, therefore it would be more complex if it isn't a cube. A simpler instance, If I was standing infront of a wall, and this wall is one side of a house, this means that house rotation isn't certainly the wall's rotation, but thier rotation is of course related to each other, How will I be able to get the rotation of the wall which is one face or side of a house/building? If you did not understand, I may try to give clearer examples. However, if you got my point, do you have any ideas to share?
  22. -- client -- local w, h = guiGetScreenSize () local destroyTime local asd = 0.138 local target local localPlayer = getLocalPlayer () local allowed = true addEvent ( "allowIt", true ) addEventHandler ( "allowIt", root, function ( element ) allowed = true end ) addEventHandler ( "onClientPlayerWeaponFire", localPlayer, function ( weapon, _, _, _, _, _, element ) if not element or not allowed then return end if weapon == 23 then target = element if not destroyTime then addEventHandler ( "onClientRender", root, drawProgress ) end destroyTime = getTickCount () end end ) function drawProgress () if not getPedTarget ( localPlayer ) then destroyTime = nil target = nil removeEventHandler ( "onClientRender", root, drawProgress ) end local prog = getTickCount () - ( destroyTime or getTickCount () ) if prog > 1000 then triggerServerEvent ( "destroyIt", localPlayer, target ) destroyTime = nil target = nil removeEventHandler ( "onClientRender", root, drawProgress ) end local w2, h2 = math.floor ( w/2 ), math.floor ( h/2 ) dxDrawLine ( w2 - 72, h2 - 6, w2 - 72, h2 + 6 ) dxDrawLine ( w2 + 72, h2 - 6, w2 + 72, h2 + 6 ) dxDrawRectangle ( w2 - 69, h2 - 6, prog * asd, 12 ) end -- server -- function destroyIt (target) destroyElement(source, target) end addEvent( "destroyIt", true ) addEventHandler( "destroyIt", root, destroyIt ) no warnings / errors...
  23. local screenW, screenH = guiGetScreenSize() local GUIEditor = { button = {}, window = {}, edit = {} } GUIEditor.window[1] = guiCreateWindow(0.35, 0.40, 0.32, 0.12, "Event hírdető panel", true) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(0.04, 0.68, 0.78, 0.23, "Beírt szöveg kiírása", true, GUIEditor.window[1]) GUIEditor.edit[1] = guiCreateEdit(0.03, 0.21, 0.93, 0.38, "", true, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(0.84, 0.68, 0.14, 0.23, "Bezár", true, GUIEditor.window[1]) guiSetVisible(GUIEditor.window[1], false) guiSetInputMode("no_binds_when_editing") function showGUI() guiSetVisible( GUIEditor.window[1], true ) showCursor( true ) end addEvent( "showguii", true ) addEventHandler( "showguii", localPlayer, showGUI ) addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[2] then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end ) addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[1] then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end ) addEventHandler("onClientGUIClick", GUIEditor.button[1], function ( ) text1 = guiGetText ( GUIEditor.edit[1] ) --text2 = guiGetText ( valasz1 ) --text3 = guiGetText ( valasz2 ) if text1 ~= "" then triggerServerEvent( "server",localPlayer,text1 ) setTimer ( function( ) text1 = nil end,5000, 1 ) end end,false ) addEventHandler ( 'onClientRender',root, function ( ) dxDrawText(text1, (screenW * 0.2924) + 1, (screenH * 0.3778) + 1, (screenW * 0.7014) + 1, (screenH * 0.5400) + 1, tocolor(0, 0, 0, 255), 2.50, "default-bold", "left", "top", false, true, false, false, false) dxDrawText(text1, screenW * 0.2924, screenH * 0.3778, screenW * 0.7014, screenH * 0.5400, tocolor(0, 186, 255, 255), 2.50, "default-bold", "left", "top", false, true, false, false, false) end ) the dx text why not show on all players screen? o-O
  24. --client local szavon = false local ido = 30 local valasz = 0 GUIEditor_Window = {} GUIEditor_Label = {} function szAblak(ker,v1,v2) if not szavon then local v_1 = v1 local v_2 = v2 local szavon = true local sw,sh = guiGetScreenSize() GUIEditor_Window[1] = guiCreateWindow(sw/1.48,sh/1.4,sw/3.2,sh/3.6,"Szavazás",false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(0.0474,0.1242,0.9161,0.2919,ker,true,GUIEditor_Window[1]) guiLabelSetHorizontalAlign(GUIEditor_Label[1],"center",true) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Label[2] = guiCreateLabel(0.0657,0.4783,0.8759,0.1553,"1.) "..v_1,true,GUIEditor_Window[1]) --guiLabelSetColor(GUIEditor_Label[2],255,200,200) --guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(0.0657,0.6335,0.8759,0.1491,"2.) "..v_2,true,GUIEditor_Window[1]) GUIEditor_Label[4] = guiCreateLabel(0.0474,0.8075,0.8,0.1,ido,true,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],150,150,255) guiSetFont(GUIEditor_Label[4],"clear-normal") bindKey ("1", "down", function() guiSetFont(GUIEditor_Label[3],"clear-normal") guiLabelSetColor(GUIEditor_Label[3],255,255,255) valasz = 1 guiLabelSetColor(GUIEditor_Label[2],255,200,200) guiSetFont(GUIEditor_Label[2],"default-bold-small") end) bindKey ("2", "down", function() guiSetFont(GUIEditor_Label[2],"default-normal") guiLabelSetColor(GUIEditor_Label[2],255,255,255) valasz = 2 guiLabelSetColor(GUIEditor_Label[3],255,200,200) guiSetFont(GUIEditor_Label[3],"default-bold-small") end) lejar = setTimer( function() ido = ido-1 guiSetText(GUIEditor_Label[4], ido ) if ido == 0 then szVeg() --killTimer(lejar) end end, 1000,30) end end function szVeg() if isTimer(lejar) then killTimer(lejar) end szavon = false guiSetText(GUIEditor_Label[4], "szavazatok számlálása..." ) guiSetFont(GUIEditor_Label[2],"default-normal") guiSetFont(GUIEditor_Label[3],"default-normal") guiLabelSetColor(GUIEditor_Label[3],255,255,255) guiLabelSetColor(GUIEditor_Label[2],255,255,255) --("valasz: "..valasz) triggerServerEvent("submit",getLocalPlayer(),valasz) unbindKey ("1", "down", function() guiSetFont(GUIEditor_Label[3],"clear-normal") guiLabelSetColor(GUIEditor_Label[3],255,255,255) valasz = 1 guiLabelSetColor(GUIEditor_Label[2],255,200,200) guiSetFont(GUIEditor_Label[2],"default-bold-small") end) unbindKey ("2", "down", function() guiSetFont(GUIEditor_Label[2],"default-normal") guiLabelSetColor(GUIEditor_Label[2],255,255,255) valasz = 2 guiLabelSetColor(GUIEditor_Label[3],255,200,200) guiSetFont(GUIEditor_Label[3],"default-bold-small") end) end addEvent("szvzas",true) addEventHandler("szvzas",getRootElement(), function(kerdes,val1,val2) szAblak(kerdes,val1,val2) end) addEvent("valaszok",true) addEventHandler("valaszok",getRootElement(), function(v1,v2) guiSetText(GUIEditor_Label[4], "_@/\"" ) guiSetText(GUIEditor_Label[2], guiGetText(GUIEditor_Label[2]) .. " - " .. v1 ) guiSetText(GUIEditor_Label[3], guiGetText(GUIEditor_Label[3]) .. " - " .. v2 ) if v1 > v2 then guiSetFont(GUIEditor_Label[2],"default-bold-small") elseif v1 < v2 then guiSetFont(GUIEditor_Label[3],"default-bold-small") end setTimer( function() destroyElement(GUIEditor_Window[1]) szavon = false ido = 30 valasz = 0 end, 5000, 1) end) --server function vote(p,s) if hasObjectPermissionTo(p,"function.kickPlayer") then triggerClientEvent("szvzas",getRootElement()) end end addCommandHandler("k",vote) function valaszok () triggerClientEvent(getRootElement(),"valaszok",getRootElement()) end Error: client.lua:20: attempt to concatenate local v_1 (a nil value) wtf?
  25. fr_server.lua: function warpMe(targetPlayer) local interior = getElementInterior(targetPlayer) setElementInterior(source, interior) setCameraInterior(source, interior) if getElementData(targetPlayer, "IsWarpLocked") then outputChatBox("The player you want to warp to has locked warping.", source, 255, 0, 0, false) return end if isPedDead(source) then spawnMe() end local vehicle = getPedOccupiedVehicle(targetPlayer) if not vehicle then -- target player is not in a vehicle - just warp next to him local x, y, z = getElementPosition(targetPlayer) clientCall(source, 'setPlayerPosition', x + 2, y, z) else -- target player is in a vehicle - warp into it if there's space left if getPedOccupiedVehicle(source) then --removePlayerFromVehicle(source) outputChatBox('Get out of your vehicle first.', source) return end local numseats = getVehicleMaxPassengers(vehicle) for i=0,numseats do if not getVehicleOccupant(vehicle, i) then if isPedDead(source) then local x, y, z = getElementPosition(vehicle) spawnMe(x + 4, y, z + 1) end warpPedIntoVehicle(source, vehicle, i) return end end outputChatBox("No free seats left in " .. getPlayerName(targetPlayer) .. "'s vehicle.", source, 255, 0, 0) end end addCommandHandler("lockwarp", function(player) setElementData(player, "IsWarpLocked", true) end) addCommandHandler("unlockwarp", function(player) removeElementData(player, "IsWarpLocked") end) fr_client.lua: {'chk', id='IsWarpLocked', text='Warp', onclick=toggleWarp, width=60},
×
×
  • Create New...