Jump to content

Dazsh

Members
  • Posts

    7
  • Joined

  • Last visited

Details

  • Gang
    WE
  • Location
    Soviet Russia
  • Interests
    Scripting

Dazsh's Achievements

Newbie

Newbie (4/54)

0

Reputation

  1. Dazsh

    [SOLVED] Admin access..

    Thank you sir, so the problem was that I probably deleted or admin resource wasn't added to acl?
  2. Dazsh

    [SOLVED] Admin access..

    "Everyone"> "Default"> "user.*"> "resource.*"> "Moderator"> "Moderator"> "resource.mapcycler"> "resource.mapmanager"> "resource.resourcemanager"> "resource.votemanager"> "SuperModerator"> "Moderator"> "SuperModerator"> "Admin"> "Moderator"> "SuperModerator"> "Admin"> "RPC"> "user.1110542jT0"> "user.RXmjU9H4N8"> "Console"> "Moderator"> "SuperModerator"> "Admin"> "RPC"> "user.Console"> "RPC"> "RPC"> "MapEditor"> "Default"> "MapEditor"> "resource.editor_main"> "resource.edf"> "raceACLGroup"> "Default"> "raceACL"> "resource.race"> "DevGroup"> "DevACL"> "autoGroup_acpanel"> "autoACL_acpanel"> "resource.acpanel"> "autoGroup_moddownloader"> "autoACL_moddownloader"> "resource.moddownloader"> "Default"> "general.ModifyOtherObjects" access="false"> "general.http" access="false"> "command.start" access="false"> "command.stop" access="false"> "command.stopall" access="false"> "command.gamemode" access="false"> "command.changemode" access="false"> "command.changemap" access="false"> "command.stopmode" access="false"> "command.stopmap" access="false"> "command.skipmap" access="false"> "command.restart" access="false"> "command.refresh" access="false"> "command.refreshall" access="false"> "command.addaccount" access="false"> "command.delaccount" access="false"> "command.debugscript" access="false"> "command.chgpass" access="false"> "command.loadmodule" access="false"> "command.upgrade" access="false"> "command.mute" access="false"> "command.crun" access="false"> "command.srun" access="false"> "command.run" access="false"> "command.unmute" access="false"> "command.kick" access="false"> "command.ban" access="false"> "command.banip" access="false"> "command.unbanip" access="false"> "command.reloadbans" access="false"> "command.shutdown" access="false"> "command.install" access="false"> "command.aexec" access="false"> "command.whois" access="false"> "command.whowas" access="false"> "function.executeCommandHandler" access="false"> "function.setPlayerMuted" access="false"> "function.addAccount" access="false"> "function.addBan" access="false"> "function.setUnbanTime" access="false"> "function.setBanAdmin" access="false"> "function.setBanReason" access="false"> "function.setBanNick" access="false"> "function.removeBan" access="false"> "function.removeAccount" access="false"> "function.setAccountPassword" access="false"> "function.kickPlayer" access="false"> "function.banIP" access="false"> "function.banPlayer" access="false"> "function.banSerial" access="false"> "function.getBansXML" access="false"> "function.unbanIP" access="false"> "function.unbanSerial" access="false"> "function.reloadBans" access="false"> "function.setServerPassword" access="false"> "function.getServerPassword" access="false"> "function.callRemote" access="false"> "function.fetchRemote" access="false"> "function.startResource" access="false"> "function.stopResource" access="false"> "function.restartResource" access="false"> "function.createResource" access="false"> "function.copyResource" access="false"> "function.addResourceMap" access="false"> "function.addResourceConfig" access="false"> "function.removeResourceFile" access="false"> "function.setResourceDefaultSetting" access="false"> "function.removeResourceDefaultSetting" access="false"> "function.redirectPlayer" access="false"> "function.aclReload" access="false"> "function.aclSave" access="false"> "function.aclCreate" access="false"> "function.aclDestroy" access="false"> "function.aclSetRight" access="false"> "function.aclRemoveRight" access="false"> "function.aclCreateGroup" access="false"> "function.aclDestroyGroup" access="false"> "function.aclGroupAddACL" access="false"> "function.aclGroupRemoveACL" access="false"> "function.aclGroupAddObject" access="false"> "function.aclGroupRemoveObject" access="false"> "function.refreshResources" access="false"> "function.setServerConfigSetting" access="false"> "function.updateResourceACLRequest" access="false"> "command.aclrequest" access="false"> "general.adminpanel" access="false"> "general.tab_players" access="false"> "general.tab_resources" access="false"> "general.tab_maps" access="false"> "general.tab_server" access="false"> "general.tab_bans" access="false"> "general.tab_adminchat" access="false"> "command.freeze" access="false"> "command.setnick" access="false"> "command.shout" access="false"> "command.spectate" access="false"> "command.slap" access="false"> "command.setgroup" access="false"> "command.sethealth" access="false"> "command.setarmour" access="false"> "command.setmoney" access="false"> "command.setskin" access="false"> "command.setteam" access="false"> "command.giveweapon" access="false"> "command.setstat" access="false"> "command.jetpack" access="false"> "command.warp" access="false"> "command.setdimension" access="false"> "command.setinterior" access="false"> "command.givevehicle" access="false"> "command.repair" access="false"> "command.blow" access="false"> "command.destroy" access="false"> "command.customize" access="false"> "command.setcolor" access="false"> "command.setpaintjob" access="false"> "command.listmessages" access="false"> "command.readmessage" access="false"> "command.listresources" access="false"> "command.execute" access="false"> "command.delete" access="false"> "command.setpassword" access="false"> "command.setwelcome" access="false"> "command.setgame" access="false"> "command.setmap" access="false"> "command.setweather" access="false"> "command.blendweather" access="false"> "command.setblurlevel" access="false"> "command.setwaveheight" access="false"> "command.setskygradient" access="false"> "command.setgamespeed" access="false"> "command.setgravity" access="false"> "command.settime" access="false"> "function.shutdown" access="false"> "command.setfpslimit" access="false"> "command.fetchRemote" access="false"> "command.unban" access="false"> "command.banserial" access="false"> "command.unbanserial" access="false"> "command.listbans" access="false"> "Moderator"> "general.ModifyOtherObjects" access="false"> "command.gamemode" access="true"> "command.changemode" access="true"> "command.changemap" access="true"> "command.stopmode" access="true"> "command.stopmap" access="true"> "command.skipmap" access="true"> "command.mute" access="true"> "command.unmute" access="true"> "command.whois" access="true"> "command.whowas" access="true"> "function.setPlayerMuted" access="true"> "function.kickPlayer" access="true"> "function.banIP" access="true"> "function.banPlayer" access="true"> "function.banSerial" access="true"> "function.getBansXML" access="true"> "function.unbanIP" access="true"> "function.unbanSerial" access="true"> "function.startResource" access="true"> "function.stopResource" access="true"> "function.restartResource" access="true"> "function.redirectPlayer" access="true"> "general.adminpanel" access="true"> "general.tab_players" access="true"> "general.tab_resources" access="false"> "general.tab_maps" access="false"> "general.tab_server" access="true"> "general.tab_bans" access="false"> "general.tab_adminchat" access="true"> "command.kick" access="false"> "command.freeze" access="true"> "command.setnick" access="true"> "command.shout" access="true"> "command.spectate" access="true"> "command.slap" access="true"> "command.setgroup" access="false"> "command.sethealth" access="true"> "command.setarmour" access="true"> "command.setmoney" access="false"> "command.setskin" access="true"> "command.setteam" access="true"> "command.giveweapon" access="true"> "command.setstat" access="true"> "command.jetpack" access="true"> "command.warp" access="true"> "command.setdimension" access="true"> "command.setinterior" access="true"> "command.createteam" access="false"> "command.destroyteam" access="false"> "command.givevehicle" access="true"> "command.repair" access="true"> "command.blowvehicle" access="true"> "command.destroyvehicle" access="true"> "command.customize" access="true"> "command.setcolor" access="true"> "command.setpaintjob" access="true"> "command.listmessages" access="true"> "command.readmessage" access="true"> "command.listresources" access="true"> "command.start" access="false"> "command.stop" access="false"> "command.stopall" access="false"> "command.restart" access="false"> "command.execute" access="false"> "command.setpassword" access="false"> "command.setwelcome" access="false"> "command.setgame" access="false"> "command.setmap" access="false"> "command.setweather" access="true"> "command.blendweather" access="true"> "command.setblurlevel" access="true"> "command.setwaveheight" access="true"> "command.setskygradient" access="true"> "command.setgamespeed" access="true"> "command.setgravity" access="true"> "command.settime" access="true"> "command.ban" access="false"> "command.unban" access="false"> "command.banip" access="false"> "command.unbanip" access="false"> "command.banserial" access="false"> "command.unbanserial" access="false"> "command.listbans" access="false"> "SuperModerator"> "general.ModifyOtherObjects" access="false"> "command.start" access="true"> "command.stop" access="true"> "command.restart" access="true"> "command.kick" access="true"> "command.ban" access="true"> "command.banip" access="true"> "command.unbanip" access="true"> "command.reloadbans" access="true"> "command.refresh" access="true"> "command.refreshall" access="true"> "command.loadmodule" access="true"> "command.addaccount" access="true"> "command.delaccount" access="true"> "command.chgpass" access="true"> "function.addAccount" access="true"> "function.removeAccount" access="true"> "function.setAccountPassword" access="true"> "general.adminpanel" access="true"> "general.tab_players" access="true"> "general.tab_resources" access="true"> "general.tab_maps" access="true"> "general.tab_server" access="true"> "general.tab_bans" access="true"> "general.tab_adminchat" access="true"> "command.freeze" access="true"> "command.mute" access="true"> "command.setnick" access="true"> "command.shout" access="true"> "command.spectate" access="true"> "command.slap" access="true"> "command.setgroup" access="false"> "command.sethealth" access="true"> "command.setarmour" access="true"> "command.setmoney" access="true"> "command.setskin" access="true"> "command.setteam" access="true"> "command.giveweapon" access="true"> "command.setstat" access="true"> "command.jetpack" access="true"> "command.warp" access="true"> "command.setdimension" access="true"> "command.setinterior" access="true"> "command.createteam" access="true"> "command.destroyteam" access="true"> "command.givevehicle" access="true"> "command.repair" access="true"> "command.blowvehicle" access="true"> "command.destroyvehicle" access="true"> "command.customize" access="true"> "command.setcolor" access="true"> "command.setpaintjob" access="true"> "command.listmessages" access="true"> "command.readmessage" access="true"> "command.listresources" access="true"> "command.stopall" access="false"> "command.execute" access="false"> "command.setpassword" access="true"> "command.setwelcome" access="true"> "command.setgame" access="true"> "command.setmap" access="true"> "command.setweather" access="true"> "command.blendweather" access="true"> "command.setblurlevel" access="true"> "command.setwaveheight" access="true"> "command.setskygradient" access="true"> "command.setgamespeed" access="true"> "command.setgravity" access="true"> "command.settime" access="true"> "command.unban" access="true"> "command.banserial" access="true"> "command.unbanserial" access="true"> "command.listbans" access="true"> "Admin"> "general.ModifyOtherObjects" access="true"> "general.http" access="true"> "command.shutdown" access="true"> "command.install" access="true"> "command.aexec" access="true"> "command.debugscript" access="true"> "command.upgrade" access="true"> "command.crun" access="true"> "command.srun" access="true"> "command.run" access="true"> "function.addBan" access="true"> "function.setUnbanTime" access="true"> "function.setBanAdmin" access="true"> "function.setBanReason" access="true"> "function.setBanNick" access="true"> "function.removeBan" access="true"> "function.reloadBans" access="true"> "function.executeCommandHandler" access="true"> "function.setServerPassword" access="true"> "function.getServerPassword" access="true"> "function.createResource" access="true"> "function.copyResource" access="true"> "function.addResourceMap" access="true"> "function.addResourceConfig" access="true"> "function.removeResourceFile" access="true"> "function.setResourceDefaultSetting" access="true"> "function.removeResourceDefaultSetting" access="true"> "function.aclReload" access="true"> "function.aclSave" access="true"> "function.aclCreate" access="true"> "function.aclDestroy" access="true"> "function.aclSetRight" access="true"> "function.aclRemoveRight" access="true"> "function.aclCreateGroup" access="true"> "function.aclDestroyGroup" access="true"> "function.aclGroupAddACL" access="true"> "function.aclGroupRemoveACL" access="true"> "function.aclGroupAddObject" access="true"> "function.aclGroupRemoveObject" access="true"> "function.refreshResources" access="true"> "function.setServerConfigSetting" access="true"> "function.updateResourceACLRequest" access="true"> "command.aclrequest" access="true"> "general.adminpanel" access="true"> "general.tab_players" access="true"> "general.tab_resources" access="true"> "general.tab_server" access="true"> "general.tab_maps" access="true"> "general.tab_bans" access="true"> "general.tab_adminchat" access="true"> "command.kick" access="true"> "command.freeze" access="true"> "command.mute" access="true"> "command.setnick" access="true"> "command.shout" access="true"> "command.spectate" access="true"> "command.slap" access="true"> "command.setgroup" access="true"> "command.sethealth" access="true"> "command.setarmour" access="true"> "command.setmoney" access="true"> "command.setskin" access="true"> "command.setteam" access="true"> "command.giveweapon" access="true"> "command.setstat" access="true"> "command.jetpack" access="true"> "command.warp" access="true"> "command.setdimension" access="true"> "command.setinterior" access="true"> "command.createteam" access="true"> "command.destroyteam" access="true"> "command.givevehicle" access="true"> "command.repair" access="true"> "command.blowvehicle" access="true"> "command.destroyvehicle" access="true"> "command.customize" access="true"> "command.setcolor" access="true"> "command.setpaintjob" access="true"> "command.listmessages" access="true"> "command.readmessage" access="true"> "command.listresources" access="true"> "command.start" access="true"> "command.stop" access="true"> "command.stopall" access="false"> "command.delete" access="true"> "command.restart" access="true"> "command.execute" access="true"> "command.setpassword" access="true"> "command.setwelcome" access="true"> "command.setgame" access="true"> "command.setmap" access="true"> "command.setweather" access="true"> "command.blendweather" access="true"> "command.setblurlevel" access="true"> "command.setwaveheight" access="true"> "command.setskygradient" access="true"> "command.setgamespeed" access="true"> "command.setgravity" access="true"> "command.settime" access="true"> "command.setfpslimit" access="true"> "function.shutdown" access="true"> "command.ban" access="true"> "command.unban" access="true"> "command.banip" access="true"> "command.unbanip" access="true"> "command.banserial" access="true"> "command.unbanserial" access="true"> "command.listbans" access="true"> "RPC"> "function.callRemote" access="true"> "function.fetchRemote" access="true"> "general.adminpanel" access="false"> "general.tab_players" access="false"> "general.tab_resources" access="false"> "general.tab_maps" access="false"> "general.tab_server" access="false"> "general.tab_bans" access="false"> "general.tab_adminchat" access="false"> "command.kick" access="false"> "command.freeze" access="false"> "command.mute" access="false"> "command.setnick" access="false"> "command.shout" access="false"> "command.spectate" access="false"> "command.slap" access="false"> "command.setgroup" access="false"> "command.sethealth" access="false"> "command.setarmour" access="false"> "command.setmoney" access="false"> "command.setskin" access="false"> "command.setteam" access="false"> "command.giveweapon" access="false"> "command.setstat" access="false"> "command.jetpack" access="false"> "command.warp" access="false"> "command.setdimension" access="false"> "command.setinterior" access="false"> "command.givevehicle" access="false"> "command.repair" access="false"> "command.blow" access="false"> "command.destroy" access="false"> "command.customize" access="false"> "command.setcolor" access="false"> "command.setpaintjob" access="false"> "command.listmessages" access="false"> "command.readmessage" access="false"> "command.listresources" access="false"> "command.start" access="false"> "command.stop" access="false"> "command.stopall" access="false"> "command.restart" access="false"> "command.execute" access="false"> "command.delete" access="false"> "command.setpassword" access="false"> "command.setwelcome" access="false"> "command.setgame" access="false"> "command.setmap" access="false"> "command.setweather" access="false"> "command.blendweather" access="false"> "command.setblurlevel" access="false"> "command.setwaveheight" access="false"> "command.setskygradient" access="false"> "command.setgamespeed" access="false"> "command.setgravity" access="false"> "command.settime" access="false"> "function.shutdown" access="false"> "command.setfpslimit" access="false"> "command.fetchRemote" access="false"> "command.ban" access="false"> "command.unban" access="false"> "command.banip" access="false"> "command.unbanip" access="false"> "command.banserial" access="false"> "command.unbanserial" access="false"> "command.listbans" access="false"> "MapEditor"> "general.ModifyOtherObjects" access="true"> "function.startResource" access="true"> "function.stopResource" access="true"> "function.restartResource" access="true"> "function.createResource" access="true"> "function.copyResource" access="true"> "function.renameResource" access="true"> "function.deleteResource" access="true"> "function.addResourceMap" access="true"> "function.addResourceConfig" access="true"> "function.removeResourceFile" access="true"> "function.setResourceDefaultSetting" access="true"> "function.removeResourceDefaultSetting" access="true"> "function.xmlLoadFile" access="true"> "function.refreshResources" access="true"> "general.adminpanel" access="false"> "general.tab_players" access="false"> "general.tab_resources" access="false"> "general.tab_maps" access="false"> "general.tab_server" access="false"> "general.tab_bans" access="false"> "general.tab_adminchat" access="false"> "command.kick" access="false"> "command.freeze" access="false"> "command.mute" access="false"> "command.setnick" access="false"> "command.shout" access="false"> "command.spectate" access="false"> "command.slap" access="false"> "command.setgroup" access="false"> "command.sethealth" access="false"> "command.setarmour" access="false"> "command.setmoney" access="false"> "command.setskin" access="false"> "command.setteam" access="false"> "command.giveweapon" access="false"> "command.setstat" access="false"> "command.jetpack" access="false"> "command.warp" access="false"> "command.setdimension" access="false"> "command.setinterior" access="false"> "command.givevehicle" access="false"> "command.repair" access="false"> "command.blow" access="false"> "command.destroy" access="false"> "command.customize" access="false"> "command.setcolor" access="false"> "command.setpaintjob" access="false"> "command.listmessages" access="false"> "command.readmessage" access="false"> "command.listresources" access="false"> "command.start" access="false"> "command.stop" access="false"> "command.stopall" access="false"> "command.restart" access="false"> "command.execute" access="false"> "command.delete" access="false"> "command.setpassword" access="false"> "command.setwelcome" access="false"> "command.setgame" access="false"> "command.setmap" access="false"> "command.setweather" access="false"> "command.blendweather" access="false"> "command.setblurlevel" access="false"> "command.setwaveheight" access="false"> "command.setskygradient" access="false"> "command.setgamespeed" access="false"> "command.setgravity" access="false"> "command.settime" access="false"> "function.shutdown" access="false"> "command.setfpslimit" access="false"> "command.fetchRemote" access="false"> "command.ban" access="false"> "command.unban" access="false"> "command.banip" access="false"> "command.unbanip" access="false"> "command.banserial" access="false"> "command.unbanserial" access="false"> "command.listbans" access="false"> "raceACL"> "general.ModifyOtherObjects" access="true"> "function.xmlLoadFile" access="true"> "function.startResource" access="true"> "function.stopResource" access="true"> "function.restartResource" access="true"> "general.adminpanel" access="false"> "general.tab_players" access="false"> "general.tab_resources" access="false"> "general.tab_maps" access="false"> "general.tab_server" access="false"> "general.tab_bans" access="false"> "general.tab_adminchat" access="false"> "command.kick" access="false"> "command.freeze" access="false"> "command.mute" access="false"> "command.setnick" access="false"> "command.shout" access="false"> "command.spectate" access="false"> "command.slap" access="false"> "command.setgroup" access="false"> "command.sethealth" access="false"> "command.setarmour" access="false"> "command.setmoney" access="false"> "command.setskin" access="false"> "command.setteam" access="false"> "command.giveweapon" access="false"> "command.setstat" access="false"> "command.jetpack" access="false"> "command.warp" access="false"> "command.setdimension" access="false"> "command.setinterior" access="false"> "command.givevehicle" access="false"> "command.repair" access="false"> "command.blow" access="false"> "command.destroy" access="false"> "command.customize" access="false"> "command.setcolor" access="false"> "command.setpaintjob" access="false"> "command.listmessages" access="false"> "command.readmessage" access="false"> "command.listresources" access="false"> "command.start" access="false"> "command.stop" access="false"> "command.stopall" access="false"> "command.restart" access="false"> "command.execute" access="false"> "command.delete" access="false"> "command.setpassword" access="false"> "command.setwelcome" access="false"> "command.setgame" access="false"> "command.setmap" access="false"> "command.setweather" access="false"> "command.blendweather" access="false"> "command.setblurlevel" access="false"> "command.setwaveheight" access="false"> "command.setskygradient" access="false"> "command.setgamespeed" access="false"> "command.setgravity" access="false"> "command.settime" access="false"> "function.shutdown" access="false"> "command.setfpslimit" access="false"> "command.fetchRemote" access="false"> "command.ban" access="false"> "command.unban" access="false"> "command.banip" access="false"> "command.unbanip" access="false"> "command.banserial" access="false"> "command.unbanserial" access="false"> "command.listbans" access="false"> "DevACL"> "resource.performancebrowser.http" access="true"> "resource.ajax.http" access="true"> "general.adminpanel" access="false"> "general.tab_players" access="false"> "general.tab_resources" access="false"> "general.tab_maps" access="false"> "general.tab_server" access="false"> "general.tab_bans" access="false"> "general.tab_adminchat" access="false"> "command.kick" access="false"> "command.freeze" access="false"> "command.mute" access="false"> "command.setnick" access="false"> "command.shout" access="false"> "command.spectate" access="false"> "command.slap" access="false"> "command.setgroup" access="false"> "command.sethealth" access="false"> "command.setarmour" access="false"> "command.setmoney" access="false"> "command.setskin" access="false"> "command.setteam" access="false"> "command.giveweapon" access="false"> "command.setstat" access="false"> "command.jetpack" access="false"> "command.warp" access="false"> "command.setdimension" access="false"> "command.setinterior" access="false"> "command.givevehicle" access="false"> "command.repair" access="false"> "command.blow" access="false"> "command.destroy" access="false"> "command.customize" access="false"> "command.setcolor" access="false"> "command.setpaintjob" access="false"> "command.listmessages" access="false"> "command.readmessage" access="false"> "command.listresources" access="false"> "command.start" access="false"> "command.stop" access="false"> "command.stopall" access="false"> "command.restart" access="false"> "command.execute" access="false"> "command.delete" access="false"> "command.setpassword" access="false"> "command.setwelcome" access="false"> "command.setgame" access="false"> "command.setmap" access="false"> "command.setweather" access="false"> "command.blendweather" access="false"> "command.setblurlevel" access="false"> "command.setwaveheight" access="false"> "command.setskygradient" access="false"> "command.setgamespeed" access="false"> "command.setgravity" access="false"> "command.settime" access="false"> "function.shutdown" access="false"> "command.setfpslimit" access="false"> "command.fetchRemote" access="false"> "command.ban" access="false"> "command.unban" access="false"> "command.banip" access="false"> "command.unbanip" access="false"> "command.banserial" access="false"> "command.unbanserial" access="false"> "command.listbans" access="false"> "autoACL_acpanel"> "function.setServerConfigSetting" access="false" who="" pending="true" date=""> "function.kickPlayer" access="false" who="" pending="true" date=""> "function.fetchRemote" access="false" who="" pending="true" date=""> "autoACL_moddownloader"> "function.restartResource" access="false" who="" pending="true" date=""> "function.callRemote" access="false" who="" pending="true" date="">
  3. Dazsh

    [SOLVED] Admin access..

    Also some errors here from console when I try to ban
  4. Hey, I having this problem for a while already and don't know how to fix it.. when I try to ban/kick or do something via admin panel it says this on console or debugscript (same) "WARNING: [admin]/admin/server/admin_server.lua:228: Access denied @ ' aclSave'" code of admin_server.lua: --[[********************************** * * 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 )
  5. Seems pretty clear code, thanks!
  6. Hello, I want to make only admins visible on radar and map, what functions should I use?
×
×
  • Create New...