Jump to content

Best-Killer1

Members
  • Posts

    203
  • Joined

  • Last visited

Everything posted by Best-Killer1

  1. see this error : ERROR: CUPGates/s_settings.lua:14: exports: Call to non-running server resource (nil) [string "?"]
  2. Ban list not showing in tabs admin panel this is the code : --[[********************************** * * Multi Theft Auto - Admin Panel * * gui\admin_main.lua * * Original File by lil_Toady * **************************************]] aAdminForm = nil aLastCheck = 0 aCurrentVehicle = 429 aCurrentWeapon = 30 aCurrentAmmo = 90 aCurrentSlap = 20 aPlayers = {} aBans = {} aLastSync = 0 aResources = {} function aAdminMenu () if ( aAdminForm == nil ) then local x, y = guiGetScreenSize() aAdminForm = guiCreateWindow ( x / 2 - 310, y / 2 - 260, 620, 520, "", false ) guiWindowSetSizable ( aAdminForm, false ) guiSetText ( aAdminForm, "Admin Panel - v".._version ) guiCreateLabel ( 0.75, 0.05, 0.45, 0.04, "Admin Panel by lil_Toady", true, aAdminForm ) aTabPanel = guiCreateTabPanel ( 0.01, 0.05, 0.98, 0.95, true, aAdminForm ) aTab1 = {} aTab1.Tab = guiCreateTab ( "Players", aTabPanel, "players" ) aTab1.Messages = guiCreateButton ( 0.75, 0.02, 0.23, 0.04, "0/0 unread messages", true, aTab1.Tab ) aTab1.ScreenShots = guiCreateButton ( 0.75, 0.065, 0.23, 0.04, "screenshots", true, aTab1.Tab ) aTab1.PlayerListSearch = guiCreateEdit ( 0.03, 0.05, 0.16, 0.04, "", true, aTab1.Tab ) guiCreateStaticImage ( 0.19, 0.05, 0.035, 0.04, "client\\images\\search.png", true, aTab1.Tab ) aTab1.HideColorCodes= guiCreateCheckBox ( 0.037, 0.94, 0.20, 0.04, "Hide color codes", true, true, aTab1.Tab ) aTab1.PlayerList = guiCreateGridList ( 0.03, 0.10, 0.20, 0.83, true, aTab1.Tab ) guiGridListAddColumn( aTab1.PlayerList, "Player Name", 0.85 ) for id, player in ipairs ( getElementsByType ( "player" ) ) do guiGridListSetItemPlayerName ( aTab1.PlayerList, guiGridListAddRow ( aTab1.PlayerList ), 1, getPlayerName ( player ), false, false ) end aTab1.Kick = guiCreateButton ( 0.71, 0.125, 0.13, 0.04, "Kick", true, aTab1.Tab, "kick" ) aTab1.Ban = guiCreateButton ( 0.85, 0.125, 0.13, 0.04, "Ban", true, aTab1.Tab, "ban" ) aTab1.Mute = guiCreateButton ( 0.71, 0.170, 0.13, 0.04, "Mute", true, aTab1.Tab, "mute" ) aTab1.Freeze = guiCreateButton ( 0.85, 0.170, 0.13, 0.04, "Freeze", true, aTab1.Tab, "freeze" ) aTab1.Spectate = guiCreateButton ( 0.71, 0.215, 0.13, 0.04, "Spectate", true, aTab1.Tab, "spectate" ) aTab1.Slap = guiCreateButton ( 0.85, 0.215, 0.13, 0.04, "Slap! "..aCurrentSlap.." _", true, aTab1.Tab, "slap" ) aTab1.SlapDropDown = guiCreateStaticImage ( 0.95, 0.215, 0.03, 0.04, "client\\images\\dropdown.png", true, aTab1.Tab ) aTab1.SlapOptions = guiCreateGridList ( 0.85, 0.215, 0.13, 0.40, true, aTab1.Tab ) guiGridListSetSortingEnabled ( aTab1.SlapOptions, false ) guiGridListAddColumn( aTab1.SlapOptions, "", 0.85 ) guiSetVisible ( aTab1.SlapOptions, false ) for i = 0, 10 do guiGridListSetItemText ( aTab1.SlapOptions, guiGridListAddRow ( aTab1.SlapOptions ), 1, tostring ( i * 10 ), false, false ) end aTab1.Nick = guiCreateButton ( 0.71, 0.260, 0.13, 0.04, "Set Nick", true, aTab1.Tab ) aTab1.Shout = guiCreateButton ( 0.85, 0.260, 0.13, 0.04, "Shout!", true, aTab1.Tab, "shout" ) aTab1.Admin = guiCreateButton ( 0.71, 0.305, 0.27, 0.04, "Give admin rights", true, aTab1.Tab, "setgroup" ) local y = 0.03 -- Start y coord local A = 0.045 -- Large line gap local B = 0.035 -- Small line gap guiCreateHeader ( 0.25, y, 0.20, 0.04, "Player:", true, aTab1.Tab ) y=y+A aTab1.Name = guiCreateLabel ( 0.26, y, 0.30, 0.035, "Name: N/A", true, aTab1.Tab ) y=y+A aTab1.IP = guiCreateLabel ( 0.26, y, 0.30, 0.035, "IP: N/A", true, aTab1.Tab ) aTab1.CountryCode = guiCreateLabel ( 0.45, y, 0.04, 0.035, "", true, aTab1.Tab ) aTab1.Flag = guiCreateStaticImage ( 0.40, y, 0.025806, 0.021154, "client\\images\\empty.png", true, aTab1.Tab ) y=y+A aTab1.Serial = guiCreateLabel ( 0.26, y, 0.435, 0.035, "Serial: N/A", true, aTab1.Tab ) --aTab1.Username = guiCreateLabel ( 0.26, 0.245, 0.435, 0.035, "Username: N/A", true, aTab1.Tab ) y=y+B aTab1.Version = guiCreateLabel ( 0.26, y, 0.435, 0.035, "Version: N/A", true, aTab1.Tab ) y=y+B aTab1.Accountname = guiCreateLabel ( 0.26, y, 0.435, 0.035, "Account Name: N/A", true, aTab1.Tab ) y=y+B aTab1.Groups = guiCreateLabel ( 0.26, y, 0.435, 0.035, "Groups: N/A", true, aTab1.Tab ) y=y+A aTab1.ACDetected = guiCreateLabel ( 0.26, y, 0.30, 0.035, "AC Detected: N/A", true, aTab1.Tab ) y=y+B aTab1.ACD3D = guiCreateLabel ( 0.26, y, 0.30, 0.035, "D3D9.DLL: N/A", true, aTab1.Tab ) y=y+B aTab1.ACModInfo = guiCreateLabel ( 0.26, y, 0.20, 0.035, "Img Mods: N/A", true, aTab1.Tab ) aTab1.ACModDetails = guiCreateButton ( 0.46, y, 0.13, 0.04, "Details", true, aTab1.Tab ) B = 0.040 y=y+A guiCreateHeader ( 0.25, y, 0.20, 0.04, "Game:", true, aTab1.Tab ) y=y+A aTab1.Health = guiCreateLabel ( 0.26, y, 0.20, 0.04, "Health: 0%", true, aTab1.Tab ) aTab1.Armour = guiCreateLabel ( 0.45, y, 0.20, 0.04, "Armour: 0%", true, aTab1.Tab ) y=y+B aTab1.Skin = guiCreateLabel ( 0.26, y, 0.20, 0.04, "Skin: N/A", true, aTab1.Tab ) aTab1.Team = guiCreateLabel ( 0.45, y, 0.20, 0.04, "Team: None", true, aTab1.Tab ) y=y+B aTab1.Weapon = guiCreateLabel ( 0.26, y, 0.35, 0.04, "Weapon: N/A", true, aTab1.Tab ) y=y+B aTab1.Ping = guiCreateLabel ( 0.26, y, 0.20, 0.04, "Ping: 0", true, aTab1.Tab ) aTab1.Money = guiCreateLabel ( 0.45, y, 0.20, 0.04, "Money: 0", true, aTab1.Tab ) y=y+B aTab1.Area = guiCreateLabel ( 0.26, y, 0.44, 0.04, "Area: Unknown", true, aTab1.Tab ) y=y+B aTab1.PositionX = guiCreateLabel ( 0.26, y, 0.30, 0.04, "X: 0", true, aTab1.Tab ) y=y+B aTab1.PositionY = guiCreateLabel ( 0.26, y, 0.30, 0.04, "Y: 0", true, aTab1.Tab ) y=y+B aTab1.PositionZ = guiCreateLabel ( 0.26, y, 0.30, 0.04, "Z: 0", true, aTab1.Tab ) y=y+B aTab1.Dimension = guiCreateLabel ( 0.26, y, 0.20, 0.04, "Dimension: 0", true, aTab1.Tab ) aTab1.Interior = guiCreateLabel ( 0.45, y, 0.20, 0.04, "Interior: 0", true, aTab1.Tab ) y=y+A guiCreateHeader ( 0.25, y, 0.20, 0.04, "Vehicle:", true, aTab1.Tab ) y=y+A aTab1.Vehicle = guiCreateLabel ( 0.26, y, 0.35, 0.04, "Vehicle: N/A", true, aTab1.Tab ) y=y+B aTab1.VehicleHealth = guiCreateLabel ( 0.26, y, 0.25, 0.04, "Vehicle Health: 0%", true, aTab1.Tab ) aTab1.SetHealth = guiCreateButton ( 0.71, 0.395, 0.13, 0.04, "Set Health", true, aTab1.Tab, "sethealth" ) aTab1.SetArmour = guiCreateButton ( 0.85, 0.395, 0.13, 0.04, "Set Armour", true, aTab1.Tab, "setarmour" ) aTab1.SetSkin = guiCreateButton ( 0.71, 0.440, 0.13, 0.04, "Set Skin", true, aTab1.Tab, "setskin" ) aTab1.SetTeam = guiCreateButton ( 0.85, 0.440, 0.13, 0.04, "Set Team", true, aTab1.Tab, "setteam" ) aTab1.SetDimension = guiCreateButton ( 0.71, 0.755, 0.13, 0.04, "Set Dimens.", true, aTab1.Tab, "setdimension" ) aTab1.SetInterior = guiCreateButton ( 0.85, 0.755, 0.13, 0.04, "Set Interior", true, aTab1.Tab, "setinterior" ) aTab1.GiveWeapon = guiCreateButton ( 0.71, 0.485, 0.27, 0.04, "Give: "..getWeaponNameFromID ( aCurrentWeapon ), true, aTab1.Tab, "giveweapon" ) aTab1.WeaponDropDown = guiCreateStaticImage ( 0.95, 0.485, 0.03, 0.04, "client\\images\\dropdown.png", true, aTab1.Tab ) aTab1.WeaponOptions = guiCreateGridList ( 0.71, 0.485, 0.27, 0.48, true, aTab1.Tab ) guiGridListAddColumn( aTab1.WeaponOptions, "", 0.85 ) guiSetVisible ( aTab1.WeaponOptions, false ) for i = 1, 46 do if ( getWeaponNameFromID ( i ) ~= false ) then guiGridListSetItemText ( aTab1.WeaponOptions, guiGridListAddRow ( aTab1.WeaponOptions ), 1, getWeaponNameFromID ( i ), false, false ) end end aTab1.SetMoney = guiCreateButton ( 0.71, 0.530, 0.13, 0.04, "Set Money", true, aTab1.Tab, "setmoney" ) aTab1.SetStats = guiCreateButton ( 0.85, 0.530, 0.13, 0.04, "Set Stats", true, aTab1.Tab, "setstat" ) aTab1.JetPack = guiCreateButton ( 0.71, 0.575, 0.27, 0.04, "Give JetPack", true, aTab1.Tab, "jetpack" ) aTab1.Warp = guiCreateButton ( 0.71, 0.620, 0.27, 0.04, "Warp to player", true, aTab1.Tab, "warp" ) aTab1.WarpTo = guiCreateButton ( 0.71, 0.665, 0.27, 0.04, "Warp player to..", true, aTab1.Tab, "warp" ) aTab1.VehicleFix = guiCreateButton ( 0.71, 0.84, 0.13, 0.04, "Fix", true, aTab1.Tab, "repair" ) aTab1.VehicleDestroy = guiCreateButton ( 0.71, 0.89, 0.13, 0.04, "Destroy", true, aTab1.Tab, "destroyvehicle" ) aTab1.VehicleBlow = guiCreateButton ( 0.85, 0.84, 0.13, 0.04, "Blow", true, aTab1.Tab, "blowvehicle" ) aTab1.VehicleCustomize = guiCreateButton ( 0.85, 0.89, 0.13, 0.04, "Customize", true, aTab1.Tab, "customize" ) aTab1.AnonAdmin = guiCreateCheckBox (0.745, 0.942, 0.20, 0.04, "Anonymous Admin", isAnonAdmin(), true, aTab1.Tab ) aTab1.GiveVehicle = guiCreateButton ( 0.71, 0.710, 0.27, 0.04, "Give: "..getVehicleNameFromModel ( aCurrentVehicle ), true, aTab1.Tab, "givevehicle" ) aTab1.VehicleDropDown = guiCreateStaticImage ( 0.95, 0.710, 0.03, 0.04, "client\\images\\dropdown.png", true, aTab1.Tab ) local gx, gy = guiGetSize ( aTab1.GiveVehicle, false ) aTab1.VehicleOptions = guiCreateGridList ( 0, 0, gx, 200, false ) guiGridListAddColumn( aTab1.VehicleOptions, "", 0.85 ) guiSetAlpha ( aTab1.VehicleOptions, 0.80 ) guiSetVisible ( aTab1.VehicleOptions, false ) local vehicleNames = {} for i = 400, 611 do if ( getVehicleNameFromModel ( i ) ~= "" ) then table.insert( vehicleNames, { model = i, name = getVehicleNameFromModel ( i ) } ) end end table.sort( vehicleNames, function(a, b) return a.name < b.name end ) for _,info in ipairs(vehicleNames) do local row = guiGridListAddRow ( aTab1.VehicleOptions ) guiGridListSetItemText ( aTab1.VehicleOptions, row, 1, info.name, false, false ) guiGridListSetItemData ( aTab1.VehicleOptions, row, 1, tostring ( info.model ) ) end aTab2 = {} aTab2.Tab = guiCreateTab ( "Resources", aTabPanel, "resources" ) aTab2.ManageACL = guiCreateButton ( 0.75, 0.02, 0.23, 0.04, "Manage ACL", true, aTab2.Tab ) aTab2.ResourceListSearch = guiCreateEdit ( 0.03, 0.05, 0.31, 0.04, "", true, aTab2.Tab ) guiCreateStaticImage ( 0.34, 0.05, 0.035, 0.04, "client\\images\\search.png", true, aTab2.Tab ) aTab2.ResourceList = guiCreateGridList ( 0.03, 0.10, 0.35, 0.80, true, aTab2.Tab ) guiGridListAddColumn( aTab2.ResourceList, "Resource", 0.55 ) guiGridListAddColumn( aTab2.ResourceList, "", 0.05 ) guiGridListAddColumn( aTab2.ResourceList, "State", 0.35 ) guiGridListAddColumn( aTab2.ResourceList, "Full Name", 0.6 ) guiGridListAddColumn( aTab2.ResourceList, "Author", 0.4 ) guiGridListAddColumn( aTab2.ResourceList, "Version", 0.2 ) aTab2.ResourceInclMaps = guiCreateCheckBox ( 0.03, 0.91, 0.15, 0.04, "Include Maps", false, true, aTab2.Tab ) aTab2.ResourceRefresh = guiCreateButton ( 0.20, 0.915, 0.18, 0.04, "Refresh list", true, aTab2.Tab, "listresources" ) aTab2.ResourceSettings = guiCreateButton ( 0.40, 0.05, 0.20, 0.04, "Settings", true, aTab2.Tab ) aTab2.ResourceStart = guiCreateButton ( 0.40, 0.10, 0.20, 0.04, "Start", true, aTab2.Tab, "start" ) aTab2.ResourceRestart = guiCreateButton ( 0.40, 0.15, 0.20, 0.04, "Restart", true, aTab2.Tab, "restart" ) aTab2.ResourceStop = guiCreateButton ( 0.40, 0.20, 0.20, 0.04, "Stop", true, aTab2.Tab, "stop" ) aTab2.ResourceDelete = guiCreateButton ( 0.40, 0.25, 0.20, 0.04, "Delete", true, aTab2.Tab, "delete" ) aTab2.ResourcesStopAll = guiCreateButton ( 0.63, 0.2, 0.20, 0.04, "Stop All Resources", true, aTab2.Tab, "stopall" ) aTab2.ResourceFailture = guiCreateButton ( 0.63, 0.10, 0.25, 0.04, "Get Load Failture", true, aTab2.Tab ) guiSetVisible ( aTab2.ResourceFailture, false ) --aModules = guiCreateTabPanel ( 0.40, 0.25, 0.57, 0.38, true, aTab2.Tab ) --What's that for? guiCreateHeader(0.40, 0.3, 0.3, 0.04, "Resource Informations:", true, aTab2.Tab) aTab2.ResourceName = guiCreateLabel ( 0.41, 0.35, 0.6, 0.03, "Full Name: ", true, aTab2.Tab ) aTab2.ResourceAuthor = guiCreateLabel ( 0.41, 0.4, 0.6, 0.03, "Author: ", true, aTab2.Tab ) aTab2.ResourceVersion = guiCreateLabel ( 0.41, 0.45, 0.6, 0.03, "Version: ", true, aTab2.Tab ) aTab2.ResourceVersion = guiCreateLabel ( 0.41, 0.45, 0.6, 0.03, "Version: ", true, aTab2.Tab ) guiCreateLabel ( 0.40, 0.77, 0.20, 0.03, "Actions log:", true, aTab2.Tab ) aTab2.LogLine1 = guiCreateLabel ( 0.41, 0.81, 0.50, 0.03, "", true, aTab2.Tab ) aTab2.LogLine2 = guiCreateLabel ( 0.41, 0.84, 0.50, 0.03, "", true, aTab2.Tab ) aTab2.LogLine3 = guiCreateLabel ( 0.41, 0.87, 0.50, 0.03, "", true, aTab2.Tab ) aTab2.LogLine4 = guiCreateLabel ( 0.41, 0.90, 0.50, 0.03, "", true, aTab2.Tab ) aTab2.LogLine5 = guiCreateLabel ( 0.41, 0.93, 0.50, 0.03, "", true, aTab2.Tab ) guiCreateLabel ( 0.41, 0.65, 0.50, 0.04, "Execute Command:", true, aTab2.Tab ) aTab2.Command = guiCreateEdit ( 0.41, 0.70, 0.40, 0.055, "", true, aTab2.Tab ) aTab2.ExecuteClient = guiCreateButton ( 0.82, 0.70, 0.16, 0.035, "Client", true, aTab2.Tab, "execute" ) aTab2.ExecuteServer = guiCreateButton ( 0.82, 0.736, 0.16, 0.035, "Server", true, aTab2.Tab, "execute" ) aTab2.ExecuteAdvanced = guiCreateLabel ( 0.45, 0.71, 0.50, 0.04, "For advanced users only.", true, aTab2.Tab ) guiLabelSetColor ( aTab2.ExecuteAdvanced, 255, 0, 0 ) aLogLines = 1 createMapTab() aTab3 = {} aTab3.Tab = guiCreateTab ( "Server", aTabPanel, "server" ) aTab3.Server = guiCreateLabel ( 0.05, 0.05, 0.70, 0.05, "Server: Unknown", true, aTab3.Tab ) aTab3.Password = guiCreateLabel ( 0.05, 0.10, 0.40, 0.05, "Password: None", true, aTab3.Tab ) aTab3.GameType = guiCreateLabel ( 0.05, 0.15, 0.40, 0.05, "Game Type: None", true, aTab3.Tab ) aTab3.MapName = guiCreateLabel ( 0.05, 0.20, 0.40, 0.05, "Map Name: None", true, aTab3.Tab ) aTab3.Players = guiCreateLabel ( 0.05, 0.25, 0.20, 0.05, "Players: 0/0", true, aTab3.Tab ) aTab3.SetPassword = guiCreateButton ( 0.80, 0.05, 0.18, 0.04, "Set Password", true, aTab3.Tab, "setpassword" ) aTab3.ResetPassword = guiCreateButton ( 0.80, 0.10, 0.18, 0.04, "Reset Password", true, aTab3.Tab, "setpassword" ) aTab3.SetGameType = guiCreateButton ( 0.80, 0.15, 0.18, 0.04, "Set Game Type", true, aTab3.Tab, "setgame" ) aTab3.SetMapName = guiCreateButton ( 0.80, 0.20, 0.18, 0.04, "Set Map Name", true, aTab3.Tab, "setmap" ) aTab3.SetWelcome = guiCreateButton ( 0.80, 0.25, 0.18, 0.04, "Welcome Message", true, aTab3.Tab, "setwelcome" ) aTab3.Shutdown = guiCreateButton ( 0.80, 0.3, 0.18, 0.04, "Shutdown", true, aTab3.Tab, "shutdown" ) guiCreateStaticImage ( 0.05, 0.32, 0.50, 0.0025, "client\\images\\dot.png", true, aTab3.Tab ) aTab3.WeatherCurrent = guiCreateLabel ( 0.05, 0.35, 0.45, 0.05, "Current Weather: "..getWeather().." ("..getWeatherNameFromID ( getWeather() )..")", true, aTab3.Tab ) aTab3.WeatherDec = guiCreateButton ( 0.05, 0.40, 0.035, 0.04, "<", true, aTab3.Tab ) aTab3.Weather = guiCreateEdit ( 0.095, 0.40, 0.35, 0.04, getWeather().." ("..getWeatherNameFromID ( getWeather() )..")", true, aTab3.Tab ) aTab3.WeatherInc = guiCreateButton ( 0.45, 0.40, 0.035, 0.04, ">", true, aTab3.Tab ) guiEditSetReadOnly ( aTab3.Weather, true ) aTab3.WeatherSet = guiCreateButton ( 0.50, 0.40, 0.10, 0.04, "Set", true, aTab3.Tab, "setweather" ) aTab3.WeatherBlend = guiCreateButton ( 0.61, 0.40, 0.15, 0.04, "Set Blended", true, aTab3.Tab, "blendweather" ) local th, tm = getTime() aTab3.TimeCurrent = guiCreateLabel ( 0.05, 0.45, 0.25, 0.04, "Time: "..th..":"..tm, true, aTab3.Tab ) aTab3.TimeH = guiCreateEdit ( 0.35, 0.45, 0.055, 0.04, "12", true, aTab3.Tab ) aTab3.TimeM = guiCreateEdit ( 0.425, 0.45, 0.055, 0.04, "00", true, aTab3.Tab ) guiCreateLabel ( 0.415, 0.45, 0.05, 0.04, ":", true, aTab3.Tab ) guiEditSetMaxLength ( aTab3.TimeH, 2 ) guiEditSetMaxLength ( aTab3.TimeM, 2 ) aTab3.TimeSet = guiCreateButton ( 0.50, 0.45, 0.10, 0.04, "Set", true, aTab3.Tab, "settime" ) guiCreateLabel ( 0.63, 0.45, 0.12, 0.04, "( 0-23:0-59 )", true, aTab3.Tab ) aTab3.GravityCurrent = guiCreateLabel ( 0.05, 0.50, 0.28, 0.04, "Gravitation: "..string.sub ( getGravity(), 0, 6 ), true, aTab3.Tab ) aTab3.Gravity = guiCreateEdit ( 0.35, 0.50, 0.135, 0.04, "0.008", true, aTab3.Tab ) aTab3.GravitySet = guiCreateButton ( 0.50, 0.50, 0.10, 0.04, "Set", true, aTab3.Tab, "setgravity" ) aTab3.SpeedCurrent = guiCreateLabel ( 0.05, 0.55, 0.30, 0.04, "Game Speed: "..getGameSpeed(), true, aTab3.Tab ) aTab3.Speed = guiCreateEdit ( 0.35, 0.55, 0.135, 0.04, "1", true, aTab3.Tab ) aTab3.SpeedSet = guiCreateButton ( 0.50, 0.55, 0.10, 0.04, "Set", true, aTab3.Tab, "setgamespeed" ) guiCreateLabel ( 0.63, 0.55, 0.09, 0.04, "( 0-10 )", true, aTab3.Tab ) aTab3.WavesCurrent = guiCreateLabel ( 0.05, 0.60, 0.25, 0.04, "Wave Height: "..getWaveHeight(), true, aTab3.Tab ) aTab3.Waves = guiCreateEdit ( 0.35, 0.60, 0.135, 0.04, "0", true, aTab3.Tab ) aTab3.WavesSet = guiCreateButton ( 0.50, 0.60, 0.10, 0.04, "Set", true, aTab3.Tab, "setwaveheight" ) guiCreateLabel ( 0.63, 0.60, 0.09, 0.04, "( 0-100 )", true, aTab3.Tab ) aTab3.FPSCurrent = guiCreateLabel ( 0.05, 0.65, 0.25, 0.04, "FPS Limit: 38", true, aTab3.Tab ) aTab3.FPS = guiCreateEdit ( 0.35, 0.65, 0.135, 0.04, "38", true, aTab3.Tab ) aTab3.FPSSet = guiCreateButton ( 0.50, 0.65, 0.10, 0.04, "Set", true, aTab3.Tab, "setfpslimit" ) guiCreateLabel ( 0.63, 0.65, 0.1, 0.04, "( 25-100 )", true, aTab3.Tab ) -- Server Bans --[[aTab4 = {} aTab4.Tab = guiCreateTab ( "Bans", aTabPanel, "bans" ) aTab4.BansList = guiCreateGridList ( 0.03, 0.05, 0.80, 0.87, true, aTab4.Tab ) guiGridListAddColumn( aTab4.BansList, "Name", 0.22 ) guiGridListAddColumn( aTab4.BansList, "IP", 0.22 ) guiGridListAddColumn( aTab4.BansList, "Serial", 0.22 ) guiGridListAddColumn( aTab4.BansList, "By", 0.22 ) guiGridListAddColumn( aTab4.BansList, "Date", 0.17 ) guiGridListAddColumn( aTab4.BansList, "Time", 0.13 ) guiGridListAddColumn( aTab4.BansList, "Reason", 0.92 ) guiGridListSetSortingEnabled( aTab4.BansList, false ) aTab4.Details = guiCreateButton ( 0.85, 0.10, 0.13, 0.04, "Details", true, aTab4.Tab ) aTab4.Unban = guiCreateButton ( 0.85, 0.20, 0.13, 0.04, "Unban", true, aTab4.Tab, "unban" ) aTab4.UnbanIP = guiCreateButton ( 0.85, 0.25, 0.13, 0.04, "Unban IP", true, aTab4.Tab, "unbanip" ) aTab4.UnbanSerial = guiCreateButton ( 0.85, 0.30, 0.13, 0.04, "Unban Serial", true, aTab4.Tab, "unbanserial" ) aTab4.BanIP = guiCreateButton ( 0.85, 0.40, 0.13, 0.04, "Ban IP", true, aTab4.Tab, "banip" ) aTab4.BanSerial = guiCreateButton ( 0.85, 0.45, 0.13, 0.04, "Ban Serial", true, aTab4.Tab, "banserial" ) aTab4.BansRefresh = guiCreateButton ( 0.85, 0.85, 0.13, 0.04, "Refresh", true, aTab4.Tab, "listbans" )
  3. [03:48:46] WARNING: SAEGAdministration\aManager\aServer.lua:103: Bad argument @ 'getPlayerAccount' [Expected element at argument 1] [03:48:46] WARNING: SAEGAdministration\aManager\aServer.lua:103: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [03:48:46] ERROR: SAEGAdministration\aManager\aServer.lua:103: attempt to concatenate a boolean value This Is the Code : function amOpenWindow ( p ) if ( getPlayerStaffLevel ( p, 'string' ) == "Owner" ) then local query = exports.NGSQL:db_query ( "SELECT * FROM accountdata ORDER BY Username" ) local accounts = { valid = { }, invalid = { } } for i, v in ipairs ( query ) do if ( getAccount ( v.Username ) ) then accounts.valid[ tostring ( v.Username ) ] = v else accounts.invalid[ v.Username] = v accounts.invalid[ v.Username].reason = "Account doesn't exist in server database" end end for i, v in ipairs ( getAccounts ( ) ) do local n = getAccountName ( v ) if ( not accounts.valid [n] and not accounts.invalid[n] ) then accounts.invalid[n] = { } accounts.invalid[n].Username = n accounts.invalid[n].reason = "Account doesn't exist in MySQL database" end end triggerClientEvent ( p, "SAEGAdministration:AccountManager:onClientOpenWindow", p, accounts ) end end addCommandHandler ( "am", amOpenWindow ) local removeAccount_ = removeAccount -- remove account addEvent ( "SAEGAdmin:amManager:removeAccountFromHistory", true ) addEventHandler ( "SAEGAdmin:amManager:removeAccountFromHistory", root, function ( account ) for i, v in ipairs ( getElementsByType ( "player" ) ) do if ( getAccountName ( getPlayerAccount ( v ) ) == account ) then return exports.SAEGMessages:sendClientMessage ( "You need to kick "..tostring(getPlayerName(v)).." before you can delete this account.", source, 255, 255, 0 ) end removeAccount(account,source) end end ) function removeAccount ( account, source ) local user = "" if ( isElement ( source ) ) then user = getPlayerName ( source ).." ("..getAccountName(getPlayerAccount(source))..")" else user = "Console (Console)" end exports.NGSQL:db_exec ( "DELETE FROM accountdata WHERE Username=?", account ) exports.NGSQL:db_exec ( "DELETE FROM bank_accounts WHERE Account=?", account ) exports.NGSQL:db_exec ( "DELETE FROM bank_transactions WHERE account=?", account ) exports.NGSQL:db_exec ( "DELETE FROM jobdata WHERE Username=?", account ) exports.NGSQL:db_exec ( "DELETE FROM log_punish WHERE account=?", account ) exports.NGSQL:db_exec ( "DELETE FROM user_shop WHERE seller_account=?", account ) exports.NGSQL:db_exec ( "DELETE FROM vehicles WHERE Owner=?", account ) local acc = getAccount ( account ) if acc then removeAccount_ ( acc ) end exports.SAEGLogs:outputActionLog ( user.." deleted account "..tostring(account) ) if(isElement(source))then amOpenWindow ( source ) end end -- Execute server data saving addEvent ( "SAEGAdmin:aManager:ExecuteServerSave", true ) addEventHandler ( "SAEGAdmin:aManager:ExecuteServerSave", root, function ( ) exports.NGSQL:saveAllData ( true ) exports.SAEGLogs:outputActionLog ( getPlayerName(source).."("..getAccountName(getPlayerAccount(source))..") saved all server data" ) end ) addEvent ( "SAEGAdmin:Module->aManager:OpenPanelFromSource", true ) addEventHandler ( "SAEGAdmin:Module->aManager:OpenPanelFromSource", root, function ( ) amOpenWindow ( source ) end ) -- Ban accounts addEvent ( "SAEGAdmin:Modules->Banner:onAdminBanClient", true ) addEventHandler ( "SAEGAdmin:Modules->Banner:onAdminBanClient", root, function ( acc, day, month, year, reason, days ) local l = getPlayerName(source).." ("..getAccountName(getPlayerAccount(source)).." banned account "..tostring(acc).." for "..tostring(days).." days | reason: "..tostring(reason) outputDebugString ( l ) exports.SAEGLogs:outputServerLog ( l ) exports.SAEGLogs:outputActionLog ( l ) exports.SAEGBans:banAccount ( acc, day, month, year, reason, getPlayerName(source) ) end ) -- update account vip addEvent ( "SAEGAdmin->Modules->aManager->VIPManager->UpdateAccountVIP", true ) addEventHandler ( "SAEGAdmin->Modules->aManager->VIPManager->UpdateAccountVIP", root, function ( account, level, day, month, year ) for i, v in pairs ( getElementsByType ( "player" ) ) do local a = getPlayerAccount ( v ) if ( not isGuestAccount ( a ) and getAccountName ( a ) == account ) then kickPlayer ( v, "Server is giving you VIP... Please reconnect." ) break end end setTimer ( function ( account, level, day, month, year, source ) exports.ngsql:db_exec ( "UPDATE accountdata SET vip=?, vipexp=? WHERE Username=?", tostring ( level ), table.concat({year,month,day},"-"), account ) exports.saeglogs:outputActionLog ( getAccountName(getPlayerAccount(source)).." updated "..tostring(account).." VIP - Level: "..tostring(level).." | Exp. Date: "..table.concat({year,month,day},"-") ) end, 250, 1, account, level, day, month, year, source) end )
  4. bro i swear i tried so much but dosen't work pls help me bro pls
  5. Learn the basic of LUA and read more about these functions by reading the examples in the wiki, that's only if you want to learn something Kariiim please can do it for me i will try to learn please i need it pls pls pls :'(
  6. I tried but dosen't work ,help Et-win pls
  7. How I can make this speaker system work only for acl groups ? this is code defaultlinks = {} defaultlinks[1] = {"", "Edit these from client.lua file"} defaultlinks[2] = {"", ""} defaultlinks[3] = {"", ""} defaultlinks[4] = {"", ""} defaultlinks[5] = {"", ""} defaultlinks[6] = {"", ""} defaultlinks[7] = {"", ""} defaultlinks[8] = {"", ""} openKey = "f5" maxdistance = 100 defaultdistance = 50 --//Dont edit these! triggerServerEvent ("clientIsReady", getRootElement()) width, height = guiGetScreenSize () speakers = {} linkTable = {} selectedURLName = "N/A" function startScript () --//Create main GUI mainWindow = guiCreateWindow ((width/2) - (500/2), (height/2) - (417/2), 500, 417, "Speaker system", false) guiWindowSetSizable (mainWindow, false) --Buttons and event handlers closeButton = guiCreateButton (450, 25, 40, 35, "Close", false, mainWindow) addEventHandler ("onClientGUIClick", closeButton, closeGUI) createButton = guiCreateButton (30, 87, 80, 40, "Create speaker", false, mainWindow) addEventHandler ("onClientGUIClick", createButton, onCreateSpeakerKlick) destroyButton = guiCreateButton (130, 87, 80, 40, "Destroy speaker", false, mainWindow) addEventHandler ("onClientGUIClick", destroyButton, onDestroySpeakerClick) myLinksButton = guiCreateButton (420, 114, 70, 35, "My links", false, mainWindow) addEventHandler ("onClientGUIClick", myLinksButton, onMyLinksButtonClick) guiSetEnabled (myLinksButton, false) --URL Stuff guiCreateLabel (90, 23, 100, 30, "Radio URL:", false, mainWindow) urlEdit = guiCreateEdit (22, 44, 200, 35, "", false, mainWindow) --50 --Max distance guiCreateLabel (259, 23, 200, 30, "Max distance (1 - " .. tostring(maxdistance) .. "):", false, mainWindow) distanceEdit = guiCreateEdit (290, 44, 50, 35, tostring(defaultdistance), false, mainWindow) -- nowPlayingText = guiCreateLabel (34, 133, 70, 30, "Now playing:", false, mainWindow) guiSetVisible (nowPlayingText, false) nowPlayingEditLabel = guiCreateLabel (112, 133, 288, 30, "-", false, mainWindow) guiSetVisible (nowPlayingEditLabel, false) guiCreateLabel (25, 145, 600, 30, "_______________________________________________________________", false, mainWindow) --Links --Edit 1 edit1 = guiCreateEdit (105, 168, 313, 23, defaultlinks[1][2], false, mainWindow) guiCreateLabel (30, 170, 200, 30, defaultlinks[1][1], false, mainWindow) guiEditSetReadOnly (edit1, true) defaultUseButton1 = guiCreateButton (423, 168, 40, 23, "use", false, mainWindow) --Edit 2 edit2 = guiCreateEdit (105, 198, 313, 23, defaultlinks[2][2], false, mainWindow) guiCreateLabel (30, 200, 200, 30, defaultlinks[2][1], false, mainWindow) guiEditSetReadOnly (edit2, true) defaultUseButton2 = guiCreateButton (423, 198, 40, 23, "use", false, mainWindow) --Edit 3 edit3 = guiCreateEdit (105, 228, 313, 23, defaultlinks[3][2], false, mainWindow) guiCreateLabel (30, 230, 200, 30, defaultlinks[3][1], false, mainWindow) guiEditSetReadOnly (edit3, true) defaultUseButton3 = guiCreateButton (423, 228, 40, 23, "use", false, mainWindow) --Edit 4 edit4 = guiCreateEdit (105, 258, 313, 23, defaultlinks[4][2], false, mainWindow) guiCreateLabel (30, 260, 200, 30, defaultlinks[4][1], false, mainWindow) guiEditSetReadOnly (edit4, true) defaultUseButton4 = guiCreateButton (423, 258, 40, 23, "use", false, mainWindow) --Edit 5 edit5 = guiCreateEdit (105, 288, 313, 23, defaultlinks[5][2], false, mainWindow) guiCreateLabel (30, 290, 200, 30, defaultlinks[5][1], false, mainWindow) guiEditSetReadOnly (edit5, true) defaultUseButton5 = guiCreateButton (423, 288, 40, 23, "use", false, mainWindow) --Edit 6 edit6 = guiCreateEdit (105, 318, 313, 23, defaultlinks[6][2], false, mainWindow) guiCreateLabel (30, 320, 200, 30, defaultlinks[6][1], false, mainWindow) guiEditSetReadOnly (edit6, true) defaultUseButton6 = guiCreateButton (423, 318, 40, 23, "use", false, mainWindow) --Edit 7 edit7 = guiCreateEdit (105, 348, 313, 23, defaultlinks[7][2], false, mainWindow) guiCreateLabel (30, 350, 200, 30, defaultlinks[7][1], false, mainWindow) guiEditSetReadOnly (edit7, true) defaultUseButton7 = guiCreateButton (423, 348, 40, 23, "use", false, mainWindow) --Edit 8 edit8 = guiCreateEdit (105, 378, 313, 23, defaultlinks[8][2], false, mainWindow) guiCreateLabel (30, 380, 200, 30, defaultlinks[8][1], false, mainWindow) guiEditSetReadOnly (edit8, true) defaultUseButton8 = guiCreateButton (423, 378, 40, 23, "use", false, mainWindow) --//-- guiSetVisible (mainWindow, false) --Add some events addEvent ("speakerStuffFromServer", true) addEventHandler ("speakerStuffFromServer", getRootElement(), createSpeaker) addEvent ("destroySpeaker", true) addEventHandler ("destroySpeaker", getRootElement(), destroySpeaker) addEvent ("onPQuit", true) addEventHandler ("onPQuit", getRootElement(), onPlayerQuit) addEvent ("createMyLinksGUI", true) addEventHandler ("createMyLinksGUI", getRootElement(), createMyLinksGUI) addEvent ("onPlayerLogout", true) addEventHandler ("onPlayerLogout", getRootElement(), onPlayerLogout) end addEventHandler ("onClientResourceStart", getResourceRootElement(), startScript) function openOrCloseGUI () if guiGetVisible (mainWindow) then guiSetVisible (mainWindow, false) guiSetVisible (linkWindow, false) showCursor (false) else guiSetVisible (mainWindow, true) showCursor (true) end end addCommandHandler ("speaker", openOrCloseGUI) bindKey (openKey, "down", openOrCloseGUI) function closeGUI () if source == closeButton then guiSetVisible (mainWindow, false) showCursor (false) end end function createMyLinksGUI (tableoflinks) linkTable = tableoflinks guiSetEnabled (myLinksButton, true) --//Create my links window linkWindow = guiCreateWindow ((width/2) - (483/2), (height/2) - (375/2), 483, 375, "My links", false) guiWindowSetSizable (linkWindow, false) guiSetAlpha (linkWindow, 0.-- s8) --> guiSetVisible (linkWindow, false) saveLinksButton = guiCreateButton (428, 25, 40, 35, "Close", false, linkWindow) guiCreateLabel (63, 48, 100, 30, "Name", false, linkWindow) guiCreateLabel (260, 48, 100, 30, "Link", false, linkWindow) --Link pad 1 linkname1 = guiCreateEdit (17, 70, 125, 23, linkTable[1]["name"], false, linkWindow) linkedit1 = guiCreateEdit (145, 70, 253, 23, linkTable[1]["link"], false, linkWindow) linkUseButton1 = guiCreateButton (428, 70, 40, 23, "use", false, linkWindow) removeButton1 = guiCreateButton (400.5, 70, 23, 23, "X", false, linkWindow) --Link pad 2 linkname2 = guiCreateEdit (17, 100, 125, 23, linkTable[2]["name"], false, linkWindow) linkedit2 = guiCreateEdit (145, 100, 253, 23, linkTable[2]["link"], false, linkWindow) linkUseButton2 = guiCreateButton (428, 100, 40, 23, "use", false, linkWindow) removeButton2 = guiCreateButton (400.5, 100, 23, 23, "X", false, linkWindow) --Link pad 3 linkname3 = guiCreateEdit (17, 130, 125, 23, linkTable[3]["name"], false, linkWindow) linkedit3 = guiCreateEdit (145, 130, 253, 23, linkTable[3]["link"], false, linkWindow) linkUseButton3 = guiCreateButton (428, 130, 40, 23, "use", false, linkWindow) removeButton3 = guiCreateButton (400.5, 130, 23, 23, "X", false, linkWindow) --Link pad 4 linkname4 = guiCreateEdit (17, 160, 125, 23, linkTable[4]["name"], false, linkWindow) linkedit4 = guiCreateEdit (145, 160, 253, 23, linkTable[4]["link"], false, linkWindow) linkUseButton4 = guiCreateButton (428, 160, 40, 23, "use", false, linkWindow) removeButton4 = guiCreateButton (400.5, 160, 23, 23, "X", false, linkWindow) --Link pad 5 linkname5 = guiCreateEdit (17, 190, 125, 23, linkTable[5]["name"], false, linkWindow) linkedit5 = guiCreateEdit (145, 190, 253, 23, linkTable[5]["link"], false, linkWindow) linkUseButton5 = guiCreateButton (428, 190, 40, 23, "use", false, linkWindow) removeButton5 = guiCreateButton (400.5, 190, 23, 23, "X", false, linkWindow) --Link pad 6 linkname6 = guiCreateEdit (17, 220, 125, 23, linkTable[6]["name"], false, linkWindow) linkedit6 = guiCreateEdit (145, 220, 253, 23, linkTable[6]["link"], false, linkWindow) linkUseButton6 = guiCreateButton (428, 220, 40, 23, "use", false, linkWindow) removeButton6 = guiCreateButton (400.5, 220, 23, 23, "X", false, linkWindow) --Link pad 7 linkname7 = guiCreateEdit (17, 250, 125, 23, linkTable[7]["name"], false, linkWindow) linkedit7 = guiCreateEdit (145, 250, 253, 23, linkTable[7]["link"], false, linkWindow) linkUseButton7 = guiCreateButton (428, 250, 40, 23, "use", false, linkWindow) removeButton7 = guiCreateButton (400.5, 250, 23, 23, "X", false, linkWindow) --Link pa d8 linkname8 = guiCreateEdit (17, 280, 125, 23, linkTable[8]["name"], false, linkWindow) linkedit8 = guiCreateEdit (145, 280, 253, 23, linkTable[8]["link"], false, linkWindow) linkUseButton8 = guiCreateButton (428, 280, 40, 23, "use", false, linkWindow) removeButton8 = guiCreateButton (400.5, 280, 23, 23, "X", false, linkWindow) --Link pad 9 linkname9 = guiCreateEdit (17, 310, 125, 23, linkTable[9]["name"], false, linkWindow) linkedit9 = guiCreateEdit (145, 310, 253, 23, linkTable[9]["link"], false, linkWindow) linkUseButton9 = guiCreateButton (428, 310, 40, 23, "use", false, linkWindow) removeButton9 = guiCreateButton (400.5, 310, 23, 23, "X", false, linkWindow) --Link pad 10 linkname10 = guiCreateEdit (17, 340, 125, 23, linkTable[10]["name"], false, linkWindow) linkedit10 = guiCreateEdit (145, 340, 253, 23, linkTable[10]["link"], false, linkWindow) linkUseButton10 = guiCreateButton (428, 340, 40, 23, "use", false, linkWindow) removeButton10 = guiCreateButton (400.5, 340, 23, 23, "X", false, linkWindow) end function onMyLinksButtonClick () if source == myLinksButton then guiSetVisible (linkWindow, true) guiMoveToBack (mainWindow) end end function closeLinkWindow () if source == closeLinkWindowButton then guiSetVisible (linkWindow, false) reloadLinkPads () end end function onCreateSpeakerKlick () if source == createButton then if speakers[player] then outputChatBox ("You already have a speaker!", 255, 0, 0) else local guiText = guiGetText (urlEdit) if guiText == "" then outputChatBox ("You need to type radio url!", 255, 0, 0) else local distance = guiGetText (distanceEdit) distance = tonumber (distance) if type (distance) ~= "number" then outputChatBox ("Distance have to be number!", 255, 0, 0) else if distance > maxdistance then outputChatBox ("Distance have to be between 1 - " .. maxdistance .. "!", 255, 0, 0) return false else if distance < 1 then outputChatBox ("Distance have to be between 1 - " .. maxdistance .. "!", 255, 0, 0) return false else player = localPlayer local url = guiGetText (urlEdit)
  8. how i can make time for shot (taser-rpg-taser in car-satchels-gernades)
  9. Nothing is deleted, you lost your password of server control panel. You are responsible for it, you even deleted the important files of server, without that server cannot run. I will suspend your server now as you don't have any experience with server. i don't forget password control panel -.- i have it and i can open the control panel
  10. Username: oussama Your name(Full and last name): oussama blide Why do you want free MTA Server?: cuz i don't have money right now i want host just for 3moths or 2moths and i will get money for pay Server Slots: 600 Your Skype: oussama.blide.II Your Email: [email protected] (other one deleted idk why i don't break any rule)
  11. You should see your Skype for server details. Your server details has been sent to you. Thanx <3 You Are The Best
  12. Username: oussama Your name(Full and last name): oussama blide Why do you want free MTA Server?: cuz i don't have money right now i want host just for 3moths or 2moths Server Slots: 100 Your Skype: oussama.blide.II Your Email: [email protected]
  13. access in the acl i don't remove it But Thanx Kariim all time you wanna help me thanx bro Thanx
  14. i can't restart /stop/start resource idk why see : [19:18:24] WARNING: admin\server\admin_sync.lua:124: Access denied @ 'getServerPassword' [19:18:28] WARNING: admin\server\admin_server.lua:1199: Access denied @ 'restartResource' [19:20:10] WARNING: admin\server\admin_server.lua:1199: Access denied @ 'restartResource' [19:20:12] WARNING: admin\server\admin_server.lua:1199: Access denied @ 'restartResource' This Code --[[********************************** * * Multi Theft Auto - Admin Panel * * admin_server.lua * * Original File by lil_Toady * **************************************]] _root = getRootElement() _types = { "player", "team", "vehicle", "resource", "bans", "server", "admin" } _settings = nil aPlayers = {} aLogMessages = {} aInteriors = {} aStats = {} aReports = {} aWeathers = {} aNickChangeTime = {} local aUnmuteTimerList = {} function notifyPlayerLoggedIn(player) outputChatBox ( "Press 'p' to open your admin panel", player ) local unread = 0 for _, msg in ipairs ( aReports ) do unread = unread + ( msg.read and 0 or 1 ) end if unread > 0 then outputChatBox( unread .. " unread Admin message" .. ( unread==1 and "" or "s" ), player, 255, 0, 0 ) end end addEventHandler ( "onResourceStart", _root, function ( resource ) if ( resource ~= getThisResource() ) then for id, player in ipairs(getElementsByType("player")) do if ( hasObjectPermissionTo ( player, "general.tab_resources" ) ) then triggerClientEvent ( player, "aClientResourceStart", _root, getResourceName ( resource ) ) end end return end _settings = xmlLoadFile ( "conf\\settings.xml" ) if ( not _settings ) then _settings = xmlCreateFile ( "conf\\settings.xml", "main" ) xmlSaveFile ( _settings ) end aSetupACL() aSetupCommands() for id, player in ipairs ( getElementsByType ( "player" ) ) do aPlayerInitialize ( player ) if ( hasObjectPermissionTo ( player, "general.adminpanel" ) ) then notifyPlayerLoggedIn(player) end end local node = xmlLoadFile ( "conf\\interiors.xml" ) if ( node ) then local interiors = 0 while ( xmlFindChild ( node, "interior", interiors ) ) do local interior = xmlFindChild ( node, "interior", interiors ) interiors = interiors + 1 aInteriors[interiors] = {} aInteriors[interiors]["world"] = tonumber ( xmlNodeGetAttribute ( interior, "world" ) ) aInteriors[interiors]["id"] = xmlNodeGetAttribute ( interior, "id" ) aInteriors[interiors]["x"] = xmlNodeGetAttribute ( interior, "posX" ) aInteriors[interiors]["y"] = xmlNodeGetAttribute ( interior, "posY" ) aInteriors[interiors]["z"] = xmlNodeGetAttribute ( interior, "posZ" ) aInteriors[interiors]["r"] = xmlNodeGetAttribute ( interior, "rot" ) end xmlUnloadFile ( node ) end local node = xmlLoadFile ( "conf\\stats.xml" ) if ( node ) then local stats = 0 while ( xmlFindChild ( node, "stat", stats ) ) do local stat = xmlFindChild ( node, "stat", stats ) local id = tonumber ( xmlNodeGetAttribute ( stat, "id" ) ) local name = xmlNodeGetAttribute ( stat, "name" ) aStats[id] = name stats = stats + 1 end xmlUnloadFile ( node ) end local node = xmlLoadFile ( "conf\\weathers.xml" ) if ( node ) then local weathers = 0 while ( xmlFindChild ( node, "weather", weathers ) ~= false ) do local weather = xmlFindChild ( node, "weather", weathers ) local id = tonumber ( xmlNodeGetAttribute ( weather, "id" ) ) local name = xmlNodeGetAttribute ( weather, "name" ) aWeathers[id] = name weathers = weathers + 1 end xmlUnloadFile ( node ) end local node = xmlLoadFile ( "conf\\reports.xml" ) if ( node ) then local messages = 0 while ( xmlFindChild ( node, "message", messages ) ) do subnode = xmlFindChild ( node, "message", messages ) local author = xmlFindChild ( subnode, "author", 0 ) local subject = xmlFindChild ( subnode, "subject", 0 ) local category = xmlFindChild ( subnode, "category", 0 ) local text = xmlFindChild ( subnode, "text", 0 ) local time = xmlFindChild ( subnode, "time", 0 ) local read = ( xmlFindChild ( subnode, "read", 0 ) ~= false ) local id = #aReports + 1 aReports[id] = {} if ( author ) then aReports[id].author = xmlNodeGetValue ( author ) else aReports[id].author = "" end if ( category ) then aReports[id].category = xmlNodeGetValue ( category ) else aReports[id].category = "" end if ( subject ) then aReports[id].subject = xmlNodeGetValue ( subject ) else aReports[id].subject = "" end if ( text ) then aReports[id].text = xmlNodeGetValue ( text ) else aReports[id].text = "" end if ( time ) then aReports[id].time = xmlNodeGetValue ( time ) else aReports[id].time = "" end aReports[id].read = read messages = messages + 1 end -- Remove duplicates local a = 1 while a <= #aReports do local b = a + 1 while b <= #aReports do if table.cmp( aReports[a], aReports[b] ) then table.remove( aReports, b ) b = b - 1 end b = b + 1 end a = a + 1 end -- Upgrade time from '4/9 5:9' to '2009-09-04 05:09' for id, rep in ipairs ( aReports ) do if string.find( rep.time, "/" ) then local monthday, month, hour, minute = string.match( rep.time, "^(.-)/(.-) (.-).-)$" ) rep.time = string.format( '%04d-%02d-%02d %02d:%02d', 2009, month + 1, monthday, hour, minute ) end end -- Sort messages by time table.sort(aReports, function(a,b) return(a.time < b.time) end) -- Limit number of messages while #aReports > g_Prefs.maxmsgs do table.remove( aReports, 1 ) end xmlUnloadFile ( node ) end local node = xmlLoadFile ( "conf\\messages.xml" ) if ( node ) then for id, type in ipairs ( _types ) do local subnode = xmlFindChild ( node, type, 0 ) if ( subnode ) then aLogMessages[type] = {} local groups = 0 while ( xmlFindChild ( subnode, "group", groups ) ) do local group = xmlFindChild ( subnode, "group", groups ) local action = xmlNodeGetAttribute ( group, "action" ) local r = tonumber ( xmlNodeGetAttribute ( group, "r" ) ) local g = tonumber ( xmlNodeGetAttribute ( group, "g" ) ) local b = tonumber ( xmlNodeGetAttribute ( group, "b" ) ) aLogMessages[type][action] = {} aLogMessages[type][action]["r"] = r or 0 aLogMessages[type][action]["g"] = g or 255 aLogMessages[type][action]["b"] = b or 0 if ( xmlFindChild ( group, "all", 0 ) ) then aLogMessages[type][action]["all"] = xmlNodeGetValue ( xmlFindChild ( group, "all", 0 ) ) end if ( xmlFindChild ( group, "admin", 0 ) ) then aLogMessages[type][action]["admin"] = xmlNodeGetValue ( xmlFindChild ( group, "admin", 0 ) ) end if ( xmlFindChild ( group, "player", 0 ) ) then aLogMessages[type][action]["player"] = xmlNodeGetValue ( xmlFindChild ( group, "player", 0 ) ) end if ( xmlFindChild ( group, "log", 0 ) ) then aLogMessages[type][action]["log"] = xmlNodeGetValue ( xmlFindChild ( group, "log", 0 ) ) end groups = groups + 1 end end end xmlUnloadFile ( node ) end end ) addEventHandler ( "onResourceStop", _root, function ( resource ) -- Incase the resource being stopped has been deleted local stillExists = false for i, res in ipairs(getResources()) do if res == resource then stillExists = true break end end if not stillExists then return end if ( resource ~= getThisResource() ) then for id, player in ipairs(getElementsByType("player")) do if ( hasObjectPermissionTo ( player, "general.tab_resources" ) ) then triggerClientEvent ( player, "aClientResourceStop", _root, getResourceName ( resource ) ) end end else local node = xmlLoadFile ( "conf\\reports.xml" ) if ( node ) then while ( xmlFindChild ( node, "message", 0 ) ~= false ) do local subnode = xmlFindChild ( node, "message", 0 ) xmlDestroyNode ( subnode ) end else node = xmlCreateFile ( "conf\\reports.xml", "messages" ) end for id, message in ipairs ( aReports ) do local subnode = xmlCreateChild ( node, "message" ) for key, value in pairs ( message ) do if ( value ) then xmlNodeSetValue ( xmlCreateChild ( subnode, key ), tostring ( value ) ) end end end xmlSaveFile ( node ) xmlUnloadFile ( node ) -- Unmute anybody muted by admin for i, player in ipairs(getElementsByType("player")) do local serial = getPlayerSerial( player ) if (aUnmuteTimerList[serial]) then aUnmuteTimerList[serial] = nil setPlayerMuted(player, false) end end end aclSave () end ) function aGetSetting ( setting ) local result = xmlFindChild ( _settings, tostring ( setting ), 0 ) if ( result ) then result = xmlNodeGetValue ( result ) if ( result == "true" ) then return true elseif ( result == "false" ) then return false else return result end end return false end function aSetSetting ( setting, value ) local node = xmlFindChild ( _settings, tostring ( setting ), 0 ) if ( not node ) then node = xmlCreateChild ( _settings, tostring ( setting ) ) end xmlNodeSetValue ( node, tostring ( value ) ) xmlSaveFile ( _settings ) end function aRemoveSetting ( setting )
  15. We can help him, but not with a leaked or no owner permission script. I know it's not him who made this HUD ,another guy but this guy stole the designs from SAUR RPG client downloaded resources. If i helped him in this case, i will be looking like i'm supporting the leaked scripts and i don't like that ah sry
  16. To 10000000000 time it's not steal script i swear i find it in google and i make someedit for it link in google? ^-^ http://www.modsmta.com/2014/12/saur-hud-v12.html
  17. To 10000000000 time it's not steal script i swear i find it in google and i make someedit for it
  18. To 10000 time it's not steal script i swear i find it in google and i make someedit for it
  19. Guys This Hud My server (i will make this i find it in google and i make some edit for it any one help me <3 ) : http://www.mediafire.com/download/ufqea ... AEGhud.zip Bugs Wanted Oxygen Ammo ______________________________ Please If You Can Fix It fix pls and give me it really i need it urgent cuz soon i will start my server <3 6 days le max Special thanks to who will fix it for me :**
  20. Oh Thanx You So Much when you get a free time fix it and send it to me in Pm waiting You <3
  21. The owner of this gamemode didn't add any data about what you're asking for, he just created a GUI with comboBoxs filled with these names. We Can't add it ??
  22. What do you mean? You want only gangs take the turfs or what? Ofc i want only Gang Take The Turfs
×
×
  • Create New...