Jump to content

Focker

Members
  • Posts

    66
  • Joined

  • Last visited

Everything posted by Focker

  1. Focker

    Help me

    some function to pop the truck tire?
  2. Focker

    Help

    but the player can attack and do not want to attack anybody or take damage
  3. Focker

    Help

    I can do as a team can not attack neither can be attacked
  4. Focker

    Help

    someone passes me the function to a button to perform its function with 3 click on it and not just 1
  5. Focker

    Help

    They help me with a function that has a limit of money and can not spend a lot
  6. Focker

    Help!!!!

    is there any other? other than AddEventHandler
  7. Focker

    Help!!!!

    I have a panel to sell weapons and when I offer to sell you a player that player waits for me and accepts disconnect so that it can bugear. some function which can tell if a player is disconnected? and the buyer can not accept.
  8. a function to Server.lua for creating something with some number forbid if that function is, but I need to and exit with warning .. there functions that could provide me?
  9. Hi All . how to make you can not use numbers in the guiCreateEdit ?
  10. Focker

    Look My help.

    Yes but how is it done?
  11. Focker

    Look My help.

    Hello I need your help on a function. I need the function that if a player buys a gun with a bullet then it can not buy it again until the end of that one bullet has
  12. Focker

    Who helps me?

    admin error took off but still Ban ERROR:[bans]NGBans\bans_server.lua:58: Database query failed: no such table: accountdata
  13. Focker

    Who helps me?

    I get this error debugscript: ERROR:[bans]NGBans\bans_server.lua:58: Database query failed: no such table: accountdata Bad argument @ 'getPlayerAccount' [Expected element at argument 1,got string' Focker']
  14. Focker

    Who helps me?

    Hello everyone, I mainly want to help me with script that is not mine, it's actually a fellow named xXMADEXx I have added to Skype and does not help me because they do not have much free time, so I ask all the privacy of this script, what I need is to walk this ban system with admin panel, because this system goes only to the admin panel of Nerd Gaming, And I want to make it work with the panel P common.. I want the punishment to be exported P panel. Titles for xXMADEXx "Or if I would have a similar system to help me get this systema" It is a similar system to that of cit Client: local ban = nil local sx, sy = guiGetScreenSize ( ) local rsx, rsy = sx, sy local sx, sy = sx/1280, sy/960 local open = false local banY = -(rsy/1.2) local font_size =(sx+sy) function drawBanScreen ( ) if not startTime then startTime = getTickCount ( ) end if not endTime then endTime = getTickCount ( ) + 3500 end local now = getTickCount() local elapsedTime = now - startTime local duration = endTime - startTime local progress = elapsedTime / duration local _, y, _ = interpolateBetween ( 0, -(rsy/1.2), 0, 0, 0, 0, progress, "OutBack" ) banY = y dxDrawBoarderedText("Baned Nerd Gaming", 0, banY, sx*1280, banY+sy*98, tocolor(255, 0, 0, 255), 2, "default", "center", "center", false, false, true, false, false) dxDrawRectangle(sx*87, banY+sy*189, sx*152, sy*40, tocolor(0, 0, 0, 0), true) dxDrawText("SERIAL:", sx*103, banY+sy*189, sx*239, banY+sy*229, tocolor(255, 0, 0, 255), font_size, "default", "left", "center", true, false, true, false, false) dxDrawRectangle(sx*249, banY+sy*189, sx*563, sy*40, tocolor(0, 0, 0, 0), true) dxDrawText(ban.serial, sx*259, banY+sy*189, sx*812, banY+sy*229, tocolor(0, 255, 9, 255), font_size, "default", "left", "center", true, false, true, false, false) dxDrawRectangle(sx*87, banY+sy*249, sx*152, sy*40, tocolor(0, 0, 0, 0), true) dxDrawText("IP:", sx*103, banY+sy*249, sx*239, banY+sy*289, tocolor(255, 0, 0, 255), font_size, "default", "left", "center", true, false, true, false, false) dxDrawRectangle(sx*249, banY+sy*249, sx*563, sy*40, tocolor(0, 0, 0, 0), true) dxDrawText(ban.ip, sx*259, banY+sy*249, sx*812, banY+sy*289, tocolor(0, 255, 9, 255), font_size, "default", "left", "center", true, false, true, false, false) dxDrawRectangle(sx*87, banY+sy*309, sx*152, sy*40, tocolor(0, 0, 0, 0), true) dxDrawText("Acount:", sx*103, banY+sy*309, sx*239, banY+sy*349, tocolor(255, 0, 0, 255), font_size, "default", "left", "center", true, false, true, false, false) dxDrawRectangle(sx*249, banY+sy*309, sx*563, sy*40, tocolor(0, 0, 0, 0), true) dxDrawText(ban.account, sx*259, banY+sy*309, sx*812, banY+sy*349, tocolor(0, 255, 9, 255), font_size, "default", "left", "center", true, false, true, false, false) dxDrawRectangle(sx*87, banY+sy*369, sx*152, sy*40, tocolor(0, 0, 0, 0), true) dxDrawText("BAN Until:", sx*103, banY+sy*369, sx*239, banY+sy*409, tocolor(255, 0, 0, 255), font_size, "default", "left", "center", true, false, true, false, false) dxDrawRectangle(sx*249, banY+sy*369, sx*563, sy*40, tocolor(0, 0, 0, 0), true) dxDrawText(ban.unban, sx*259, banY+sy*369, sx*812, banY+sy*409, tocolor(0, 255, 9, 255), font_size, "default", "left", "center", true, false, true, false, false) dxDrawRectangle(sx*87, banY+sy*429, sx*152, sy*40, tocolor(0, 0, 0, 0), true) dxDrawText("BANED:", sx*103, banY+sy*429, sx*239, banY+sy*469, tocolor(255, 0, 0, 255), font_size, "default", "left", "center", true, false, true, false, false) dxDrawRectangle(sx*249, banY+sy*429, sx*563, sy*40, tocolor(0, 0, 0, 0), true) dxDrawText(ban.banned_on, sx*259, banY+sy*429, sx*812, banY+sy*469, tocolor(0, 255, 9, 255), font_size, "default", "left", "center", true, false, true, false, false) dxDrawRectangle(sx*87, banY+sy*489, sx*152, sy*40, tocolor(0, 0, 0, 0), true) dxDrawText("BAN FOR :", sx*103, banY+sy*489, sx*239, banY+sy*529, tocolor(255, 0, 0, 255), font_size, "default", "left", "center", true, false, true, false, false) dxDrawRectangle(sx*249, banY+sy*489, sx*563, sy*40, tocolor(0, 0, 0, 0), true) dxDrawText(ban.banner, sx*259, banY+sy*489, sx*812, banY+sy*529, tocolor(0, 255, 9, 255), font_size, "default", "left", "center", true, false, true, false, false) dxDrawRectangle(sx*87, banY+sy*549, sx*152, sy*40, tocolor(0, 0, 0, 0), true) dxDrawText("Themes:", sx*103, banY+sy*549, sx*239, banY+sy*589, tocolor(255, 0, 0, 255), font_size, "default", "left", "center", true, false, true, false, false) dxDrawRectangle(sx*249, banY+sy*549, sx*563, sy*40, tocolor(0, 0, 0, 0), true) dxDrawText(ban.reason, sx*259, banY+sy*549, sx*812, banY+sy*589, tocolor(0, 255, 9, 255), font_size, "default", "left", "center", true, false, true, false, false) dxDrawBoarderedText("APPEAL BAN Nerd Gaming.NET", sx*330, banY+sy*609, sx*812, banY+sy*649, tocolor(255, 0, 0, 255), 2, "default", "center", "center", true, false, true, false, false, 0, 0, 0, 2) end addEvent ( "NGBans:OpenClientBanScreen", true ) addEventHandler ( "NGBans:OpenClientBanScreen", root, function ( d ) ban = d if ( tonumber ( ban.unban_month ) and tonumber ( ban.unban_month ) < 10 ) then ban.unban_month = "0"..ban.unban_month end if ( tonumber ( ban.unban_day ) and tonumber ( ban.unban_day ) < 10 ) then ban.unban_day = "0"..ban.unban_day end ban.unban = table.concat ({ tostring(ban.unban_year), tostring(ban.unban_month), tostring(ban.unban_day) }, "-" ) if ( tostring ( ban.unban ):upper() == "NIL" ) then ban.unban = "Forever" end if open then return end open = true addEventHandler ( "onClientPreRender", root, drawBanScreen ) end ) function dxDrawBoarderedText ( text, x, y, endX, endY, color, size, font, alignX, alignY, clip, wordBreak, postGUI, colorCode, subPixelPos, fRot, fRotCX, fRotCY, offSet ) local text = tostring ( text ) local x = tonumber(x) or 0 local y = tonumber(y) or 0 local endX = tonumber(endX) or x local endY = tonumber(endY) or y local color = color or tocolor ( 255, 255, 255, 255 ) local size = tonumber(size) or 1 local font = font or "default" local alignX = alignX or "left" local alignY = alignY or "top" local clip = clip or false local wordBreak = wordBreak or false local postGUI = postGUI or false local colorCode = colorCode or false local subPixelPos = subPixelPos or false local fRot = tonumber(fRot) or 0 local fRotCX = tonumber(fRotCX) or 0 local fRotCY = tonumber(fRotCy) or 0 local offSet = tonumber(offSet) or 1 local t_g = text:gsub ( "#%x%x%x%x%x%x", "" ) dxDrawText ( t_g, x-offSet, y-offSet, endX, endY, tocolor(0,0,0,255), size, font, alignX, alignY, clip, wordBreak, postGUI, colorCode, subPixelPos, fRot, fRotCX, fRotCY, offSet ) dxDrawText ( t_g, x-offSet, y, endX, endY, tocolor(0,0,0,255), size, font, alignX, alignY, clip, wordBreak, postGUI, colorCode, subPixelPos, fRot, fRotCX, fRotCY, offSet ) dxDrawText ( t_g, x, y-offSet, endX, endY, tocolor(0,0,0,255), size, font, alignX, alignY, clip, wordBreak, postGUI, colorCode, subPixelPos, fRot, fRotCX, fRotCY, offSet ) dxDrawText ( t_g, x+offSet, y+offSet, endX, endY, tocolor(0,0,0,255), size, font, alignX, alignY, clip, wordBreak, postGUI, colorCode, subPixelPos, fRot, fRotCX, fRotCY, offSet ) dxDrawText ( t_g, x+offSet, y, endX, endY, tocolor(0,0,0,255), size, font, alignX, alignY, clip, wordBreak, postGUI, colorCode, subPixelPos, fRot, fRotCX, fRotCY, offSet ) dxDrawText ( t_g, x, y+offSet, endX, endY, tocolor(0,0,0,255), size, font, alignX, alignY, clip, wordBreak, postGUI, colorCode, subPixelPos, fRot, fRotCX, fRotCY, offSet ) return dxDrawText ( text, x, y, endX, endY, color, size, font, alignX, alignY, clip, wordBreak, postGUI, colorCode, subPixelPos, fRot, fRotCX, fRotCY, offSet ) end Server: local bans = { } -- All bans are saved here, until server save, or this resource stops --[[ bans table format: bans[serial] = { serial = user serial, ip = user ip, account = user account, unban_day = unban day, unban_month = unban month, unban_year = unban year, reason = reason, banner = the person who banned, banned_on = when the user was banned } ]] --executeSQLQuery("DROP TABLE ban_system") executeSQLQuery("CREATE TABLE IF NOT EXISTS ban_system (id INTEGER PRIMARY KEY, serial TEXT, ip TEXT, account TEXT,unban_day TEXT,unban_month TEXT,unban_year TEXT,banner TEXT,reason TEXT,banned_on TEXT)") addEventHandler ( "onResourceStart", resourceRoot, function ( ) --exports.NGSQL:db_exec ( "CREATE TABLE IF NOT EXISTS ban_system ( serial TEXT, ip TEXT, account TEXT, unban_day INT, unban_month INT, unban_year INT, banner TEXT, reason TEXT, banned_on DATE )" ); -- Load the bans local q = executeSQLQuery("SELECT * FROM ban_system") --local q = exports.NGSQL:db_query ( "SELECT * FROM ban_system" ); if ( q and type ( q ) == "table" ) then for i, v in pairs ( q ) do local data = { } for ind, var in pairs ( v ) do data[ind] = var if ( ind == "unban_day" or ind == "unban_month" or ind == "unban_year" ) then data[ind] = tonumber ( var ) end end bans[v.serial] = data isSerialBanned ( v.serial ) end end setTimer ( function ( ) local playerSerials = { } for i, v in pairs ( getElementsByType ( "player" ) ) do playerSerials[getPlayerSerial(v)] = v end for i, v in pairs ( bans ) do if ( playerSerials [ v.serial ] ) then loadBanScreenForPlayer ( playerSerials [ v.serial ] ) end end playerSerials = nil end, 500, 1 ) end ) function banAccount ( acc, ban_day, unban_month, ban_year, reason, banner ) local reason = reason or "Not defined" local banner = banner or "Server" local d = executeSQLQuery("SELECT * FROM accountdata WHERE Username=?", acc) if ( d and type ( d ) == "table" and table.len ( d ) == 1 ) then local d = d [ 1 ] local ser = d['LastSerial'] local ip = d['LastIP'] local ban_day = tonumber ( ban_day ) or 1 local unban_month = tonumber ( unban_month ) or 1 local ban_year = tonumber ( ban_year ) or 2015 bans[ser] = { serial = ser, ip = ip, account = acc, unban_day = ban_day, unban_month = unban_month, unban_year = ban_year, reason = reason, banner = banner, banned_on = exports.NGPlayerFunctions:getToday() } for i, v in pairs ( getElementsByType ( "player" ) ) do local a = getPlayerAccount ( v ) if ( not isGuestAccount ( a ) and getAccountName ( a ) == acc ) then kickPlayer ( v, "Reconectando algo paso" ) break end end end end function isSerialBanned ( serial ) if ( bans [ serial ] ) then local isBanContinuted = false local today = today ( ) local d = bans [ serial ] if ( tostring(d.unban_year):upper() == "NIL" or tostring(d.unban_month):upper() == "NIL" or tostring(d.unban_day):upper() == "NIL" ) then return true end local unbanMeth = "" if ( d.unban_year > today.year ) then isBanContinuted = true unbanMeth = 1 elseif ( d.unban_year == today.year and d.unban_month > today.month ) then isBanContinuted = true unbanMeth = 2 elseif ( d.unban_year == today.year and d.unban_month == today.month and d.unban_day > today.day ) then isBanContinuted = true unbanMeth = 3 end if ( not isBanContinuted ) then bans [ serial ] = nil return false end -- try to detect the player for i, v in pairs ( getElementsByType ( "player" ) ) do if ( getPlayerSerial ( v ) == serial ) then loadBanScreenForPlayer ( v ) break end end return true end end function loadBanScreenForPlayer ( player ) toggleAllControls ( player, false ) showChat ( player, false ) setPlayerHudComponentVisible ( player, 'all', false ) setElementData ( player, "Online", "Banned" ) setElementData ( player, "Zona", "Banned" ) setElementData ( player, "Ocupacion", "Banned" ) setElementData ( player, "Dinero", "Banned" ) setElementData ( player, "Usuario Lvl(Respeto)", "Banned" ) setElementData ( player, "Gang", "Banned" ) local d = bans [ getPlayerSerial ( player ) ] local banInfo = { account = d.account, ip = d.ip, serial = d.serial, reason = d.reason, banner = d.banner, unban_day = d.unban_day, unban_month = d.unban_month, unban_year = d.unban_year, banned_on = d.banned_on } for i, v in pairs ( banInfo ) do banInfo [ i ] = tostring ( v ) end triggerClientEvent ( player, "NGBans:OpenClientBanScreen", player, banInfo ) end addEventHandler ( "onPlayerLogin", root, function ( ) local s = getPlayerSerial ( source ) if ( bans [ s ] ) then kickPlayer ( source, "Ya! Estas Ban." ) end end ) function unbanAccount ( acc ) local rV = false for i, v in pairs ( bans ) do if ( v.account == acc ) then bans[i] = nil rV = true break end end return rV end function saveBans ( ) executeSQLQuery("DELETE FROM ban_system") local c = 0 for i, v in pairs ( bans ) do executeSQLQuery("INSERT INTO ban_system (serial, ip, account, unban_day, unban_month, unban_year, banner, reason, banned_on ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ? )", --exports.NGSQL:db_exec ( "INSERT INTO ban_system ( serial, ip, account, unban_day, unban_month, unban_year, banner, reason, banned_on ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ? )", v.serial, v.ip, v.account, v.unban_day, v.unban_month, v.unban_year, v.banner, v.reason, v.banned_on ) c = c + 1 end return c end addEventHandler ( "onResourceStop", resourceRoot, saveBans ) -- misc functions function today ( ) local d = getRealTime ( ) local day = d.monthday local month = d.month + 1 local year = d.year + 1900 return { year=year, day=day, month=month } end function table.len ( t ) local c = 0; for i, v in pairs ( t ) do c = c + 1 end return c end meta: "xXMADEXx" type="script" version="1.0" name="Nerd Gaming User Banning System" />
  15. Focker

    Help

    but if that is all that could remove the panel off script that
  16. Focker

    Help

    Hi I need help, I want to remove this panel sv but nose that script is already clear everything and yet not .. someone could tell me how it is removed. http://www.subirimagenes.com/privadas-m ... 20483.html
  17. Focker

    Help

    please help me aparesca need a team on the list as a team in the script and everyone can see that list
  18. Focker

    Help

    but nose if do to that list aparesca one team in place and that everyone can see
  19. Focker

    Help

    It leaves no mistake, but I want everyone to see the list but only leave the team since the script
  20. Focker

    Help

    It does not work, plus I want everyone to see that list but that is only the criminal team
  21. Focker

    Help

    I want to try to make a script that leaves the team list something like function ponerPlayerList () if ( players ) then guiGridListClear(list) for id, player in ipairs(getElementsByType("player")) do local swats = ( player == localPlayer ) and getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) == 'Criminals') local row = guiGridListAddRow ( list ) guiGridListSetItemText ( list, row, players, getPlayerName ( player ), false, false ) end end end
  22. Focker

    Help

    no, I put a list but it guiCreateGridList a team
  23. Focker

    Help

    Hello I have a question. I can say that functions can take to leave me a list of a team player.
  24. Focker

    Help

    Could you show me an example? is that and put those functions but is wrong to use .. if the player grabs the object inside 0 and goes to another inside the object bug
×
×
  • Create New...