Jump to content

Search the Community

Showing results for tags 'working'.

  • 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 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))
  2. 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?
  3. Well, this is recent, it was working fine, but now it stopped working, any solution? (arguments are right) no error in debug !
  4. I have this: addEventHandler('onPlayerQuit', root, function(reason) Reasons = { ["Unknown"] = "Nem tudni", ["Quit"] = "kilépett.", ["Kicked"] = "kirúgva a szerverről.", ["Banned"] = "kibanolva a szerverről.", ["Timed Out"] = "kifagyott.", ["Bad Connection"] = "rossz internetkapcsolat" } local name = getPlayerName(source) triggerClientEvent(root, "createNotification", root, "#FFffFF"..Reasons[reason], "simple", name) end ) and the "Quit", "Kicked", and "Banned" msg working fine, but the "Timed Out" no.. does not show the timed out notification, but why? yeah, and i got this error: S.lua:12: attempt to concatenate field '?' (a nil value) thanks the help!
  5. 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!
  6. 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
  7. 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?
  8. 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
  9. 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?
  10. addEventHandler ( "onPlayerVehicleExit", getRootElement(), function(player) if isPedInVehicle (player) then local theVehicle = getPedOccupiedVehicle(player) if getVehicleType(theVehicle) == "Train" then destroyElement(trailer) destroyElement(trailer2) destroyElement(trailer3) outputChatBox("#FFffFFElhagytad a mozdonyt. A vagonok törlődtek!", player, r,g,b, true) end end end ) Warning: Bad argument @ 'isPedInVehicle' [Expected ped at argument 1, got vehicle] how to fix this?
  11. 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?
  12. function dependent(player) local accountName = getAccountName ( getPlayerAccount ( player ) ) local hour = getAccountData ( playeraccount, "Játszott idő-hours") if hour = 30 then aclGroupAddObject (aclGetGroup("Dependent"), "user."..accountName) end end i got this error: [22:44:11] ERROR: Loading script failed: jatszottido\ji.lua:86: 'then' expected near '=' how to fix this?
  13. function playbotvok1(message,messageType) if message == "hogy lehet rangom" or message == "hogy lehet rangom?" or message == "Hogy lehet rangom" or message == "Hogy lehet rangom ?" or message "hogy lehet rangom?" or message == "hogy lehet rangom ?" or message == "Hogy lehet rangom?" or message == "Lehetek rangos?" or message == "lehetek rangos" or message == "lehetek rangos?" or message == "Lehetek rangos?" then outputChatBox( "#14B866[M] #FF699CPlaybot#898395: #808080Rangot tudsz venni. F10 gombot ha megnyomod, megtalálod az infókat a vásárláshoz. (#ffFFff"..getPlayerName(source).."#808080)", root, 255, 0, 0, true ) end end addEventHandler("onPlayerChat",getRootElement(),playbotvok1) function fegyverrol(message,messageType) if message == "hogy szerezzek fegyvert" or message == "hogy szerezzek fegyvert?" or message == "Hogy szerezzek fegyvert" or message == "Hogy szerezzek fegyvert ?" or message "hogy szerezzek fegyot?" or message == "hogy szerezzek fegyót ?" or message == "Hogy szerezzek fegyót?" or message == "hogy lehet fegyverem?" or message == "hogy lehet fegyom?" or message == "hol lehet venni fegyvert?" or message == "hol lehet venni fegyvert" or message == "Hol lehet venni fegyvert?" or message == "Hol lehet venni fegyvert" or message == "Hol lehet venni fegyvert ?" then outputChatBox( "#14B866[M] #FF699CPlaybot#898395: #808080Fegyvert kétféle módon lehet szerezni. Egyik: F7, másik, hogy keresel! (#ffFFff"..getPlayerName(source).."#808080)", root, 255, 0, 0, true ) end end addEventHandler("onPlayerChat",getRootElement(),fegyverrol) Error: attempt to call local 'message' (a string value) but script is working fine... how to fix this? i tried "local = message { }" but same error...
  14. -- 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...
  15. 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
  16. addEventHandler("onClientRender", root, addEventHandler("onClientGUIClick", GUIEditor.button[1], function() text1 = guiGetText(GUIEditor.edit[1]) --text2 = guiGetText(valasz1) --text3 = guiGetText(valasz2) if text1 ~= "" then --triggerServerEvent("server",localPlayer,text1) 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(255, 0, 0, 255), 2.50, "default-bold", "left", "top", false, true, false, false, false) setTimer ( function() text1 = nil end, 5000, 1 ) end end ) ) what wrong in this?
  17. --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?
  18. 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...