Jump to content

FSXTim

Members
  • Content Count

    220
  • Joined

  • Last visited

Community Reputation

0 Neutral

About FSXTim

  • Rank
    Trick
  1. Hello, I got the following error in the serverside script: Bad argument @ 'setElementData' [Expected element at argument 1, got string '0'] (Zeile 5) clientside: function unbannB (state) if state == "left" then if source == GUIEditor_Admin_Button[10] then local nick = guiGetText(GUIEditor_Admin_Edit[9]) triggerServerEvent("unbannP", lp, nick) end end end addEventHandler("onClientGUIClick", getRootElement(), unbannB) serverside: function unbannP (nick) local name = MySQL_GetString("Bann", "user_data", nick) if name t
  2. Thank you, it's working now. Greets
  3. Error (line 13): Bad argument @ 'setElementData' [expected element at argument one, got nil] function spam(message) local player = source local msg = getElementData(source, "Spam") if message == msg then outputChatBox("Bitte wiederhole dich nicht!", source, 255, 0, 0) cancelEvent() end if isTimer(spamTimer) then killTimer(spamTimer) end spamTimer = setTimer( function() setElementData(source, "Spam", "0") end , 10000, 1, source) setElementData(source, "Spam", message) end addEventHa
  4. I have still the same error. What do I have to change? function muteCheck() setTimer( function() playerN = source playerNa = getPlayerName(playerN) if tonumber(getElementData(playerN, "Mute")) > 0 then local muteTime = tonumber(getElementData(playerN, "Mute")) setPlayerMuted(playerN, true) mTime = muteTime*60000 setTimer( function() if getElementData(playerN, "LoggedIn") then setPlayerMuted(p
  5. Hello, I have a small problem. Error (line 6): Bad argument @ 'getElementData' [expected element at argument one, got nil] function muteCheck() setTimer( function() local player = source local name = getPlayerName(player) if tonumber(getElementData(player, "Mute")) > 0 then local muteTime = tonumber(getElementData(player, "Mute")) setPlayerMuted(player, true) mTime = muteTime*60000 setTimer( function() if getElementDat
  6. Thanks you, it's working now. Greets
  7. Hello, I have more than 61000 dollars and I type "/givemoney FSXTim 100", but the console says: "You don't have enough money!" (line 9 in the script) function giveMoney(player, command, target, m) local target = getPlayerFromName(target) local money = tonumber(m) if isElement(target) then if tonumber(getElementData(player, "Geld") == money) or tonumber(getElementData(player, "Geld") > money) then setElementData(player, "Geld", getElementData(player, "Geld") - money) setElementData(target, "Geld", getElementData(target, "Geld") + money
  8. Thank you, it's working now. Greets
  9. Error: Bad argument @ 'guiSetVisible' [expected gui-element at argument 1, got nil] [line 8] images = {} for i, index in ipairs (getElementsByType("player")) do guiCreateStaticImage(650,30 - 15 + 15 * i,18,16, rank, false, gImage["playerList"]) end function iFalse() for i = 1, getPlayerCount() do guiSetVisible(images[i], false) end end addEvent("iFalse", true) addEventHandler("iFalse", getRootElement(), iFalse) function getPlayerCount() return #getElementsByType("player") end Greets
  10. Thank you, but now I have another problem. Error: attempt to index global 'images' (a nil value) (line 2) for i, index in ipairs (getElementsByType("player")) do images[i] = guiCreateStaticImage(650,30 - 15 + 15 * i,18,16, "rank/rank.png", false, gImage["playerList"]) end function iFalse() for i = 1, getPlayerCount() do guiSetVisible(images[i], false) end end addEvent("iFalse", true) addEventHandler("iFalse", getRootElement(), iFalse) function getPlayerCount() return #getElementsByType("player") end Greets
  11. Could anybody help me, please? Greets
  12. Error: 'end' expected (to close 'function' at line 1) near 'setTimer' function getPlayerCount() for i, playerName in ipairs (getElementsByType("player")) do players = players + 1 end return players setTimer( function() players = 0 end , 100, 1) end Greets
  13. I want to make all images invisible, but at the moment only one image is invisible. Greets
×
×
  • Create New...