Jump to content

Juukoo

Members
  • Posts

    1
  • Joined

  • Last visited

Juukoo's Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

0

Reputation

  1. Hey, my payday script is not work. The script gives only error to debugscript and nothing is happening. debugscript: ERROR: Payday\server.lua:14: bad argument #1 to 'gsub' (string expected, got boolean) Thanks! function giveMoney () players = getElementsByType ("player") for k, pelaaja, auto in ipairs(players) do onlineTime = getElementData(pelaaja, "online") if onlineTime == false then return false else h = gettok(onlineTime, 1, " ") m = gettok(onlineTime, 2, " ") m = string.gsub(m, "min", "") h = string.gsub(h, "h", "") h = tonumber(h) m = tonumber(m) if m < 1 then return false else if h > 0 then m = h*180+m raha = m*1.667 raha = math.floor(raha) players = getElementsByType ("player") outputChatBox ("You been online for " .. onlineTime .. " and got " .. raha .. "$ for it!", pelaaja, 255, 255, 255, true) givePlayerMoney (pelaaja, raha) else raha = m*1.667 raha = math.floor(raha) players = getElementsByType ("player") outputChatBox ("You been online for " .. m .. "min and got " .. raha .. "$ for it!", pelaaja, 255, 255, 255, true) givePlayerMoney (pelaaja, raha) end end end end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), timer)
×
×
  • Create New...