Jump to content

mat_290

Members
  • Posts

    7
  • Joined

  • Last visited

Details

  • Gang
    POLICE

mat_290's Achievements

Newbie

Newbie (4/54)

0

Reputation

  1. General Information. AceMTA is a roleplay community and is strongly founded around the belief of community and communication between its players. AceMTA is a community that was developed by Goofballmantis and has lasted on for years. After some current situations my partner and I have taken over the community and we are looking again for dedicated players to come back into the community and enjoy the olden days of roleplay. The bills and the ownership of the community is paid by goofballmantis but the AceMTA server is ran by myself and formychar. What's different between now and then? The first major change within AceMTA is the leadership. The server, as stated above, is under the leadership of myself (mat_290) and Formychar. We are both very active people and are always communicating to our staff team and our players. The next major change is that AceMTA is now stationed in Red County. We want to try and encourage a smaller community of dedicated players that are open for roleplay and want that feeling of having multiple towns and places to go to. We are also introducing new scripts that are going to hopefully set us apart from other servers and help us grow into a well developed community. What do we need from the community? Currently AceMTA is looking for dedicated admins and experienced mappers. We are starting in Red County and we need a mapping team set up to help with filling up the empty spaces in the map. We need custom mappers for government areas and buildings. A mapping team for donations. We are also looking for dedicated admins that can help us with keeping peace on the server and developing a good roleplay standard that everyone should follow. Where can you found out more information and get the server ip? Any other information can be found at acemta.com. If you have any further questions, comments or concerns, Please PM me on the forums or at our website.
  2. I just change line 44 to if ( array == nil ) and then i added the return true statement to the bottom of the function. I just get the stack overflow on line 43.
  3. Thank you that works. But then I get a stack overflow error....
  4. So then I can do it like that ok. Does anyone know what is causing this error code?
  5. Which I fixed but I still get the same error code.
  6. Well If I did that there is no error code but then pushing Tab doesn't bring up the scoreboard.
  7. The way this code works is when you hit Tab it shows the scoreboard, Well whenever I hit Tab it shows that error. What do I need to do to fix this? The error is on line 64. Error "attempt to index field '?' (a nil value)" Error Code if ( array[j][1] < smallest ) --------- [ Element Data returns ] --------- local function getData( theElement, key ) local key = tostring(key) if isElement(theElement) and (key) then return exports['[ars]anticheat-system']:c_callData( theElement, tostring(key) ) else return false end end -------------- [ Scoreboard ] --------------- local screenX, screenY = guiGetScreenSize() local width, height = 300, 420 local x = (screenX/2) - (width/2) local y = (screenY/2) - (height/2) local logowidth, logoheight = 275, 275 local logox = (x/2) - (logowidth/2) local logoy = (y/2) - (logoheight/2) local isEventHandled = false local page = 1 local a = { "Z", "W", "Y", "G", "H", "L", "P", "A", "B" } function getPlayerIDTable( ) local array = { } --[[ for key, thePlayer in ipairs ( getElementsByType("player") ) do local playerID = tonumber( getData( thePlayer, "playerid") ) if ( playerID ) then array[#array + 1] = { playerID, thePlayer } end end ]]-- for i = 1, 9 do local j = math.random( 1, 9 ) if ( array[j] == nil ) then array[i] = { j, a[ math.random( 1, 9 ) ] } end end return array end local players = { } function assemblePlayersByID( ) local array = getPlayerIDTable( ) local smallest, index, tempo for i = 1, #array do smallest = array[i][1] index = i for j = i + 1, #array do if ( array[j][1] < smallest ) then smallest = array[j][1] index = j end end -- flip arrays tempo = array[i] array[i] = array[index] array[index] = tempo end -- Sort for key, value in ipairs ( array ) do players[value[1]] = value[2] end end function removePlayerFromList( ) local playerID = tonumber( getData(source, "playerid") ) players[playerID] = nil end addEventHandler("onClientPlayerQuit", getRootElement(), removePlayerFromList) function renderPlayerList( ) dxDrawRectangle(x, y, width, height, tocolor(0, 0, 0, 200)) limit = 0 for k, v in pairs (players) do limit = limit + 1 end local clientName = getPlayerName(getLocalPlayer()):gsub("_", " ") dxDrawText("Bone County Roleplay 1.0", x + 2, y + 403, screenX, screenY, tocolor(255, 255, 255, 150), 1, "default-bold") dxDrawText("Players: (".. limit .."/50)", x + 208, y + 403, screenX, screenY, tocolor(255, 255, 255, 150), 1, "default-bold") dxDrawText("ID", x + 15, y + 13, screenX, screenY, tocolor(255, 255, 255, 150), 1, "default-bold") dxDrawText("Player", x + 60, y + 13, screenX, screenY, tocolor(255, 255, 255, 150), 1, "default-bold") dxDrawText("Ping", x + 250, y + 13, screenX, screenY, tocolor(255, 255, 255, 150), 1, "default-bold") dxDrawLine(x, y + 30, x + 299, y + 30, tocolor(255, 255, 255, 150), 1) local yTxt = (screenY/2) - (height/2) + 35 for k, v in ipairs (players) do if isElement(v) then local name = tostring( getPlayerName(v):gsub("_", " ") ) local id = tostring( getData(v, "playerid") ) local ping = tostring( getPlayerPing(v) ) local r, g, b = getPlayerNametagColor(v) if ( page == 1 ) then if k <= 24 then if name == clientName then dxDrawRectangle(x, yTxt, 300, 15, tocolor(255, 255, 255, 40)) end dxDrawText(tostring(id), x + 15, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") dxDrawText(tostring(name), x + 60, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") dxDrawText(tostring(ping), x + 250, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") yTxt = yTxt + 15 end elseif ( page == 2 ) then if k >= 12 and k < 36 then if name == clientName then dxDrawRectangle(x, yTxt, 300, 15, tocolor(255, 255, 255, 40)) end dxDrawText(tostring(id), x + 15, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") dxDrawText(tostring(name), x + 60, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") dxDrawText(tostring(ping), x + 250, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") yTxt = yTxt + 15 end elseif ( page == 3 ) then if k >= 24 and k < 48 then if name == clientName then dxDrawRectangle(x, yTxt, 300, 15, tocolor(255, 255, 255, 40)) end dxDrawText(tostring(id), x + 15, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") dxDrawText(tostring(name), x + 60, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") dxDrawText(tostring(ping), x + 250, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") yTxt = yTxt + 15 end elseif ( page == 4 ) then if k >= 36 and k < 60 then if name == clientName then dxDrawRectangle(x, yTxt, 300, 15, tocolor(255, 255, 255, 40)) end dxDrawText(tostring(id), x + 15, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") dxDrawText(tostring(name), x + 60, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") dxDrawText(tostring(ping), x + 250, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") yTxt = yTxt + 15 end elseif ( page == 5 ) then if k >= 48 and k < 72 then if name == clientName then dxDrawRectangle(x, yTxt, 300, 15, tocolor(255, 255, 255, 40)) end dxDrawText(tostring(id), x + 15, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") dxDrawText(tostring(name), x + 60, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") dxDrawText(tostring(ping), x + 250, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") yTxt = yTxt + 15 end elseif ( page == 6 ) then if id >= 60 and id < 84 then if name == clientName then dxDrawRectangle(x, yTxt, 300, 15, tocolor(255, 255, 255, 40)) end dxDrawText(tostring(id), x + 15, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") dxDrawText(tostring(name), x + 60, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") dxDrawText(tostring(ping), x + 250, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") yTxt = yTxt + 15 end elseif ( page == 7 ) then if id >= 72 and id < 96 then if name == clientName then dxDrawRectangle(x, yTxt, 300, 15, tocolor(255, 255, 255, 40)) end dxDrawText(tostring(id), x + 15, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") dxDrawText(tostring(name), x + 60, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") dxDrawText(tostring(ping), x + 250, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") yTxt = yTxt + 15 end elseif ( page == 8 ) then if id >= 84 and id < 108 then if name == clientName then dxDrawRectangle(x, yTxt, 300, 15, tocolor(255, 255, 255, 40)) end dxDrawText(tostring(id), x + 15, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") dxDrawText(tostring(name), x + 60, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") dxDrawText(tostring(ping), x + 250, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") yTxt = yTxt + 15 end elseif ( page == 9 ) then if id >= 96 and id < 120 then if name == clientName then dxDrawRectangle(x, yTxt, 300, 15, tocolor(255, 255, 255, 40)) end dxDrawText(tostring(id), x + 15, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") dxDrawText(tostring(name), x + 60, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") dxDrawText(tostring(ping), x + 250, yTxt, screenX, screenY, tocolor(r, g, b, 255), 1, "default-bold") yTxt = yTxt + 15
×
×
  • Create New...