Wysłany: 2012-06-21, 17:57
tymczasowy
Numb
Wiek: 38 Na forum: 5125 dni Posty: 41
Nick w MP: Rosso
Witam, to znowu ja ;D
M?j problem jest taki - Posiadam trzy komendy kt?re chcia?bym przydzieli? danej grupie w ACL. Lecz jak przydzieli?em ow? komend? to i tak wszyscy mog? jej u?ywa?. Co zrobi?em ?le?
ACL grupa
Kod: </group>
<group name="N.A.S">
<acl name="N.A.S"></acl>
<object name="user.Rosso"></object>
</group>
ACL
Kod: </acl>
<acl name="N.A.S">
<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.kick" access="false"></right>
<right name="command.freeze" access="false"></right>
<right name="command.mute" 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.start" access="false"></right>
<right name="command.stop" access="false"></right>
<right name="command.stopall" access="false"></right>
<right name="command.restart" 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.ban" access="false"></right>
<right name="command.unban" access="false"></right>
<right name="command.banip" access="false"></right>
<right name="command.unbanip" access="false"></right>
<right name="command.banserial" access="false"></right>
<right name="command.unbanserial" access="false"></right>
<right name="command.listbans" access="false"></right>
<right name="command.open" access="true"></right>
<right name="command.close" access="true"></right>
<right name="command.bron" access="true"></right>
</acl> </acl>
Trzy na samym ko?cu *UP*
Kody na komendy
Kod: function consoleGiveWeapon ( playerSource, commandName, weapName )
if ( playerSource ) then
local weapID = getWeaponIDFromName ( weapName )
if ( weapID ) then
giveWeapon ( playerSource, weapID, 200 )
outputChatBox ( "Posiadasz teraz... " .. weapName, playerSource )
else outputChatBox ( "Z?a nazwa broni." )
end
end
end
addCommandHandler ( "bron", consoleGiveWeapon )
Kod: brama = createObject ( 971, 777.90002441406, -1384.9000244141, 16.299999237061 )
function bo()
moveObject (brama, 1000, 777.90002441406, -1384.9000244141, 16.299999237061 )
end
addCommandHandler("close", bo)
function bc()
moveObject (brama, 1000,777.90002441406, -1385.0999755859, 8.2999992370605 )
end
addCommandHandler("open", bc)
Dodam jeszcze ?e w panelu admina w Menage ACL w "dziale" N.A.S mam na zielono te trzy dodane komendy - lecz jak pisa?em ka?dy mo?e ich u?ywa?.
Nie wiem czy odpowiedni dzia?, je?eli si? pomyli?em to przepraszam
Za pomoc
Wysłany: 2012-06-21, 23:31
Wielebny
Wiek: 41 Na forum: 5499 dni Posty: 257
Nick w MP: Wielebny
Piwa : 1690
http://wiki.multitheftaut...dCommandHandler - trzeci parametr
Zmie?
Kod:
addCommandHandler("close", bo)
na
Kod:
addCommandHandler("close", bo, false)
I komenda b?dzie zablokowana dla ka?dej grupy kt?ra nie ma ALLOW.
Druga opcja to dodanie domy?lnej grupie DENY na t? komend?.
[ Komentarz dodany przez: Pioruniasty : 2012-06-22, 00:51 ]
Poprawi?em bbcode
Ostatnio zmieniony przez Piorun 2012-06-22, 00:51, w całości zmieniany 1 raz
Wysłany: 2012-06-22, 15:58
tymczasowy
Numb
Wiek: 38 Na forum: 5125 dni Posty: 41
Nick w MP: Rosso
Co? chyba ?le zrobi?em
Kod cmd /bron
Kod: function consoleGiveWeapon ( playerSource, commandName, weapName )
if ( playerSource ) then
local weapID = getWeaponIDFromName ( weapName )
if ( weapID ) then
giveWeapon ( playerSource, weapID, 200 )
outputChatBox ( "Posiadasz teraz... " .. weapName, playerSource )
else outputChatBox ( "Z?a nazwa broni." )
end
end
end
addCommandHandler ( "bron", consoleGiveWeapon, false )
Kod cmd na bram?
Kod: brama = createObject ( 971, 777.90002441406, -1384.9000244141, 16.299999237061 )
function bo()
moveObject (brama, 1000, 777.90002441406, -1384.9000244141, 16.299999237061 )
end
addCommandHandler("close", bo, false)
function bc()
moveObject (brama, 1000,777.90002441406, -1385.0999755859, 8.2999992370605 )
end
addCommandHandler("open", bc, false)
Dalej je?eli nie jestem w grupie N.A.S to mog? u?ywa? te komendy.
Wysłany: 2012-06-25, 23:25
XFawkes
Programista LUA
Wiek: 32 Na forum: 6508 dni Posty: 12
Nick w MP: ~[EPG]~Puma
Piwa : 762
Wysłany: 2012-06-26, 14:55
Jacob
Głupiomądry
Wiek: 28 Na forum: 5502 dni Posty: 967
Nick w MP: Jacob
Piwa : 786
XFawkes ,
Cytat: It's recommended not to use this function to limit features to users that belong to specific groups. Instead use hasObjectPermissionTo. Using this function forces the server owner to name their group a certain way, whereas using hasObjectPermissionTo allows the owner to give permission for whatever features you restrict to whatever groups they have set up in their ACL.
lepiej http://wiki.multitheftaut...ectPermissionTo
Wysłany: 2012-06-26, 18:08
tymczasowy
Numb
Wiek: 38 Na forum: 5125 dni Posty: 41
Nick w MP: Rosso
Dzi?ki, jako? to zrobi?em dzi?ki "hasObjectPermissionTo" ;D Zimne piwko dla was.
Jeszcze jeden problem
Jak wpisuje komend? /close - da?em sobie uprawnienia. To ca?y czas wyskakuje ?e nie mam uprawnie?. W koemndzie z broni? zrobi?em podobnie i dzia?a a tu nie ;/ Co ?le zrobi?em??? Nast?pne za pomoc ;D
Kod: brama = createObject ( 971, 777.90002441406, -1384.9000244141, 16.299999237061 )
function bo()
if ( hasObjectPermissionTo ( playerSource, "command.close", false ) ) then
if ( hasObjectPermissionTo ( getThisResource (), "command.close", true ) ) then
moveObject (brama, 1000, 777.90002441406, -1384.9000244141, 16.299999237061 )
else
outputChatBox ( "Nie masz uprawnie? do tej komendy.", playerSource )
end
else
outputChatBox ( "Nie masz uprawnie? do tej komendy.", playerSource )
end
end
addCommandHandler("close", bo )
Wysłany: 2012-06-26, 21:01
Jacob
Głupiomądry
Wiek: 28 Na forum: 5502 dni Posty: 967
Nick w MP: Jacob
Piwa : 786
brama = createObject ( 971 , 777.90002441406 , - 1384.9000244141 , 16.299999237061 )
function bo ( playerSource , cmd )
if ( hasObjectPermissionTo ( playerSource , "command.close" , false ) ) then
if ( hasObjectPermissionTo ( getThisResource (), "command.close" , true ) ) then
moveObject ( brama , 1000 , 777.90002441406 , - 1384.9000244141 , 16.299999237061 )
else
outputChatBox ( "Nie masz uprawnie? do tej komendy." , playerSource )
end
else
outputChatBox ( "Nie masz uprawnie? do tej komendy." , playerSource )
end
end
addCommandHandler ( "close" , bo )
Wysłany: 2012-06-27, 11:19
tymczasowy
Numb
Wiek: 38 Na forum: 5125 dni Posty: 41
Nick w MP: Rosso
Dobra ogarn??em to, lecz jest jeszcze ma?y problem z jedna komend? i z chatem.
Co ?le mam w tej komendzie ?e ci?gle wyskakuje ?e nie mam pozwolenia - chocia? je mam
Kod: stars = createTeam ( "S.T.A.R.S", 0, 0, 255 )
function login (player,playerSource,cmd)
if ( hasObjectPermissionTo ( playerSource, "command.stars", false ) ) then
if ( hasObjectPermissionTo ( getThisResource (player), "command.stars", true ) ) then
setPlayerTeam ( player, S.T.A.R.S)
setElementModel ( player, 285 )
else
outputChatBox ( "Nie posiadasz uprawnie? do u?ywania tej komendy." )
end
else
outputChatBox ( "Nie posiadasz uprawnie? do u?ywania tej komendy.", playerSource )
end
end
addCommandHandler("stars",login,false)
Oraz, jak ustawi? aby np: Kod: outputChatBox ( "Nie posiadasz uprawnie? do u?ywania tej komendy." )
To na czacie wyskakiwa?o tylko osobie kt?ra pope?ni b??d. Jak wpisze np. /stars to ka?dy widzi powy?szy komunikat na czacie, a chce ?eby tylko jedna osoba to widzia?a.
Tagi: przydzielenie :: komendy :: danej :: grupie
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: