Tematy otagowane jako: isobjectinaclgroup
1. isObjectInACLGroup
Witam, nie dziala mi ten kod
function zeznanie ()
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( element ) ), aclGetGroup ( "SAPD" ) ) then
outputChatBox ( zeznanie1 , source )
else
outputChatBox ( "Nie jeste? policjantem!" , source )
end
end
addCommandHandler ( "zeznajtir" , zeznanie )
Dokladniej:
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( element ) ), aclGetGroup ( "SAPD" ) ) then
Pisze mi, ze mam zla wartosc.
2. Nie dziala isObjectInACLGroup
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source )), aclGetGroup ( "Policja" )) then
addCommandHandler ( "onColShapeHit" , auto , OtworzBrame )
else end
jest to skrypt na bramy ale daje kawa?ek, oco chodzi? pisze:
3. isObjectInACLGroup
Witam. Wie kto? czemu na mta sa wiki jest z?y kod na isObjectInACLGroup albo ja ?le przekopiowa?em go ?. Generalnie tak :
Kod:
function modifyChatMessage ( message , msgtype )
local localPlayerName = getPlayerName ( source )
if isObjectInACLGroup ( "user." .. localPlayerName , aclGetGroup ( "RPC" ) ) then
setPlayerNametagColor ( source , 255 , 0 , 0 )
local outputText = "[Wlasiciel] #FFFFFF" .. getPlayerName ( source ).. ": #FF0000" .. message
outputChatBox ( outputText , root , 255 , 0 , 0 , true )
else
local nickR , nickG , nickB = getPlayerNametagColor ( source )
local outputText = getPlayerName ( source ).. ": #FFFFFF" .. message
outputChatBox ( outputText , root , nickR , nickG , nickB , true )
end
end
DB3: Nie ma ,ale po napisaniu nie mam nametagu oraz tekst napisany przez mnie doubluje si?.
4. isObjectInACLGroup
Witam, mam pewien problem, chce zrobic komende dla RCON'?w
if isObjectInACLGroup ( "user." .. accName , aclGetGroup ( "RCON" ) ) then
I mam problem bo nie chce mi dzia?ac :
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- get his account name
if isObjectInACLGroup ( "user." .. accName , aclGetGroup ( "RCON" ) ) then O co mo?e chodzic, jest error z getPlayerAcconunt.
5. isObjectInACLGroup
Witam!
Pr?buje zrobi? skrypt na dawanie praw. Lecz nie dzia?a mi jeden if
Kod:
function giveHA ( source , commandName , accountName )
local konto = getAccountName ( getPlayerAccount ( source ))
if isObjectInACLGroup ( "user." .. konto , aclGetGroup ( "HeadAdmin" )) then
if accountName then
aclGroupAddObject ( aclGetGroup ( "HeadAdmin" ), "user." .. accountName )
outputChatBox ( "#ff4500Konto #808080" .. accountName .. "#ff4500 dosta?o rang? HeadAdmin" , source , 0 , 0 , 0 , true )
outputChatBox ( "#ff4500Dosta?e? rang? HeadAdmin" , accountName , 0 , 0 , 0 , true )
else
outputChatBox ( "#ff4500Nie poda?e? konta!" , source , 0 , 0 , 0 , true )
outputChatBox ( "#ff4500Poprawna forma: #808080/dajha [konto]" , source , 0 , 0 , 0 , true )
end
else
outputChatBox ( "#ff4500Nie posiadasz uprawnie?!" , source , 0 , 0 , 0 , true )
end
end
addCommandHandler ( "dajha" , giveHA )
B??dy: