Tosti Posted March 16, 2012 Share Posted March 16, 2012 Witam mam problem mianowicie. Kopiuję kod z wiki.multitheftauto.com o ten kodzik: function createAdminTeamOnStart () SAPD = createTeam ( "Wydział Pościgowy SAPD", 0, 0, 255 ) end addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) function setAdminTeam() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("SAPD")) setPlayerTeam(source, SAPD) end end addEventHandler("onPlayerLogin",getRootElement(),setAdminTeam) Robię metę do skryptu, szmery bajery a tu lipa bo skrypt nie działa... Czy ktoś może mi powiedzieć gdzie robie błąd ? Link to comment
Wojak Posted March 17, 2012 Share Posted March 17, 2012 skrypt nie działa... ? sądzisz że podałeś wystarczająco dużo informacji? Na oko: skrypt ma stworzyć team o nazwie "Wydział Pościgowy SAPD", potem gdy ktoś się zaloguje sprawdzić czy ta osoba jest w grupie ACL o nazwie "SAPD", jeśli jest to dodać tą osobę do teamu więc co nie działa ? (pytania pomocnicze: czy jesteś pewien że w pliku ACL jest wszystko w porządku?; czy sądzisz że ludzie z tego forum mają dar jasnowidzenia, dlatego nie podałeś kodu z pliku ACL) Link to comment
Tosti Posted March 17, 2012 Author Share Posted March 17, 2012 <group name="SAPD"> <acl name="SAPD"></acl> <object name="user.hunter"></object> </group> Tu jest grupa ACL a tu prawa: <acl name="SAPD"> <right name="general.ModifyOtherObjects" access="false"></right> <right name="general.http" access="false"></right> <right name="command.start" access="false"></right> <right name="command.stop" access="false"></right> <right name="command.stopall" access="false"></right> <right name="command.gamemode" access="false"></right> <right name="command.changemode" access="false"></right> <right name="command.changemap" access="false"></right> <right name="command.stopmode" access="false"></right> <right name="command.stopmap" access="false"></right> <right name="command.skipmap" access="false"></right> <right name="command.restart" access="false"></right> <right name="command.refresh" access="false"></right> <right name="command.refreshall" access="false"></right> <right name="command.addaccount" access="false"></right> <right name="command.delaccount" access="false"></right> <right name="command.debugscript" access="false"></right> <right name="command.chgpass" access="false"></right> <right name="command.loadmodule" access="false"></right> <right name="command.upgrade" access="false"></right> <right name="command.mute" access="false"></right> <right name="command.crun" access="false"></right> <right name="command.srun" access="false"></right> <right name="command.run" access="false"></right> <right name="command.unmute" access="false"></right> <right name="command.kick" access="false"></right> <right name="command.ban" access="false"></right> <right name="command.banip" access="false"></right> <right name="command.unbanip" access="false"></right> <right name="command.shutdown" access="false"></right> <right name="command.install" access="false"></right> <right name="command.aexec" access="false"></right> <right name="command.whois" access="false"></right> <right name="command.whowas" access="false"></right> <right name="function.executeCommandHandler" access="false"></right> <right name="function.setPlayerMuted" access="false"></right> <right name="function.addAccount" access="false"></right> <right name="function.addBan" access="false"></right> <right name="function.removeBan" access="false"></right> <right name="function.removeAccount" access="false"></right> <right name="function.setAccountPassword" access="false"></right> <right name="function.kickPlayer" access="false"></right> <right name="function.banIP" access="false"></right> <right name="function.banPlayer" access="false"></right> <right name="function.banSerial" access="false"></right> <right name="function.getBansXML" access="false"></right> <right name="function.unbanIP" access="false"></right> <right name="function.unbanSerial" access="false"></right> <right name="function.getClientIP" access="false"></right> <right name="function.setServerPassword" access="false"></right> <right name="function.getServerPassword" access="false"></right> <right name="function.callRemote" access="false"></right> <right name="function.startResource" access="false"></right> <right name="function.stopResource" access="false"></right> <right name="function.restartResource" access="false"></right> <right name="function.createResource" access="false"></right> <right name="function.copyResource" access="false"></right> <right name="function.addResourceMap" access="false"></right> <right name="function.addResourceConfig" access="false"></right> <right name="function.removeResourceFile" access="false"></right> <right name="function.setResourceDefaultSetting" access="false"></right> <right name="function.removeResourceDefaultSetting" access="false"></right> <right name="function.redirectPlayer" access="false"></right> <right name="function.aclReload" access="false"></right> <right name="function.aclSave" access="false"></right> <right name="function.aclCreate" access="false"></right> <right name="function.aclDestroy" access="false"></right> <right name="function.aclSetRight" access="false"></right> <right name="function.aclRemoveRight" access="false"></right> <right name="function.aclCreateGroup" access="false"></right> <right name="function.aclDestroyGroup" access="false"></right> <right name="function.aclGroupAddACL" access="false"></right> <right name="function.aclGroupRemoveACL" access="false"></right> <right name="function.aclGroupAddObject" access="false"></right> <right name="function.aclGroupRemoveObject" access="false"></right> <right name="function.refreshResources" access="false"></right> <right name="function.setServerConfigSetting" access="false"></right> <right name="function.updateResourceACLRequest" access="false"></right> <right name="command.aclrequest" access="false"></right> <right name="general.adminpanel" access="false"></right> <right name="general.tab_players" access="false"></right> <right name="general.tab_resources" access="false"></right> <right name="general.tab_maps" access="false"></right> <right name="general.tab_server" access="false"></right> <right name="general.tab_bans" access="false"></right> <right name="general.tab_adminchat" access="false"></right> <right name="command.freeze" access="false"></right> <right name="command.setnick" access="false"></right> <right name="command.shout" access="false"></right> <right name="command.spectate" access="false"></right> <right name="command.slap" access="false"></right> <right name="command.setgroup" access="false"></right> <right name="command.sethealth" access="false"></right> <right name="command.setarmour" access="false"></right> <right name="command.setmoney" access="false"></right> <right name="command.setskin" access="false"></right> <right name="command.setteam" access="false"></right> <right name="command.giveweapon" access="false"></right> <right name="command.setstat" access="false"></right> <right name="command.jetpack" access="false"></right> <right name="command.warp" access="false"></right> <right name="command.setdimension" access="false"></right> <right name="command.setinterior" access="false"></right> <right name="command.givevehicle" access="false"></right> <right name="command.repair" access="false"></right> <right name="command.blow" access="false"></right> <right name="command.destroy" access="false"></right> <right name="command.customize" access="false"></right> <right name="command.setcolor" access="false"></right> <right name="command.setpaintjob" access="false"></right> <right name="command.listmessages" access="false"></right> <right name="command.readmessage" access="false"></right> <right name="command.listresources" access="false"></right> <right name="command.execute" access="false"></right> <right name="command.setpassword" access="false"></right> <right name="command.setwelcome" access="false"></right> <right name="command.setgame" access="false"></right> <right name="command.setmap" access="false"></right> <right name="command.setweather" access="false"></right> <right name="command.blendweather" access="false"></right> <right name="command.setblurlevel" access="false"></right> <right name="command.setwaveheight" access="false"></right> <right name="command.setskygradient" access="false"></right> <right name="command.setgamespeed" access="false"></right> <right name="command.setgravity" access="false"></right> <right name="command.settime" access="false"></right> <right name="command.unban" access="false"></right> <right name="command.banserial" access="false"></right> <right name="command.unbanserial" access="false"></right> <right name="command.listbans" access="false"></right> </acl> Jeszcze jest możliwość że źle napisałem plik meta.xml bo nie wiem po której stronie jest ta funkcja czy client czy server. Link to comment
Wojak Posted March 17, 2012 Share Posted March 17, 2012 ACL wygląda ok... w opisie funkcji ALC w prawym górnym rogu jest taki pomarańczowy napis: "Server-only function" czy zasób zgłasza jakieś błędy, jesteś w stanie podać logi debugera? https://wiki.multitheftauto.com/wiki/Debugging Link to comment
Tosti Posted March 17, 2012 Author Share Posted March 17, 2012 Niezbardzo ogarniam debugowanie. Nie wiem z czym to sie je... Nie obsługuje się tym. Link to comment
Tosti Posted March 17, 2012 Author Share Posted March 17, 2012 Ewentualnie mogę komuś wysłać ten skrypt żeby go obejrzał, ale żeby nie było że wyręczam się kimś tylko po prostu jestem w kropce i nie wiem co z tym faktem zrobić. Link to comment
Mefisto_PL Posted March 18, 2012 Share Posted March 18, 2012 Pokaż plik meta.xml ,ponieważ to ten skrypt jak to ujął Wojak "Server-only function". Zatem plik meta powinien wyglądać tak: <meta> <info author="Tosti" type="script" name="NAZWA-SKRYPTU" version="1.0" /> <script src="NAZWA-SKRYPTU.lua" type="server"/> </meta> Link to comment
Tosti Posted March 18, 2012 Author Share Posted March 18, 2012 Moja meta wygląda tak: <meta> <info name="SAPD" description="Automatycznie dodanie do Teamu przez ACL" author="Tosti" version="1.1" type="script" /> <script src="script.lua" type="server" /> </meta> Więc jest chyba dobra. Link to comment
Mefisto_PL Posted March 18, 2012 Share Posted March 18, 2012 Hmm.. wejdź na serwer (kupiony lub host game) i jak się zalogujesz na admina wpisz komendę /debugscript 3 i podaj nam jaki błąd Ci wyskoczył . Link to comment
Mefisto_PL Posted March 18, 2012 Share Posted March 18, 2012 Bez sensu napisałeś to "Dobra". Powinieneś wysłać od razu ten błąd.. Jeśli masz zamiar odpisać teraz "no dobra" albo coś w tym stylu to lepiej wgl nie odpisuj Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now