ChrisT Posted December 8, 2019 Share Posted December 8, 2019 Sziasztok az adminchat-be található hogy: outputChatBox ( "#FFFFFF Nem vagy Admin!", thePlayer, 255, 255, 255, true )... ezt szeretném kitörölni,. de ha csak símán kitörlöm, akkor hibát ír és nem működik function adminchat ( thePlayer, _, ... ) local message = table.concat ( { ... }, " " ) if ( isPlayerOnGroup ( thePlayer ) ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( isPlayerOnGroup ( player ) ) then outputChatBox ( "#7CC576[AdminChat] Tulajdonos #FFFFFF ".. getPlayerName ( thePlayer ) ..": ".. message, player, 255, 255, 255, true ) end end else * outputChatBox ( "#FFFFFF Nem vagy Admin!", thePlayer, 255, 255, 255, true ) end end addCommandHandler ( "a", adminchat ) function isPlayerOnGroup ( thePlayer ) local account = getPlayerAccount ( thePlayer ) local inGroup = false for _, group in ipairs ( { "Console", "Tulajdonos" } ) do if isObjectInACLGroup ( "user.".. getAccountName ( account ), aclGetGroup ( group ) ) then inGroup = true break end end return inGroup end Link to comment
WorthlessCynomys Posted December 8, 2019 Share Posted December 8, 2019 function adminchat ( thePlayer, _, ... ) local message = table.concat ( { ... }, " " ) if ( isPlayerOnGroup ( thePlayer ) ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( isPlayerOnGroup ( player ) ) then outputChatBox ( "#7CC576[AdminChat] Tulajdonos #FFFFFF ".. getPlayerName ( thePlayer ) ..": ".. message, player, 255, 255, 255, true ) end end end end addCommandHandler ( "a", adminchat ) Link to comment
ChrisT Posted December 14, 2019 Author Share Posted December 14, 2019 3. sorba hibát talált Link to comment
Moderators Patrick Posted December 15, 2019 Moderators Share Posted December 15, 2019 On 14/12/2019 at 08:13, ChrisT said: 3. sorba hibát talált Nyilván attól a isPlayerOnGroup funckció is ugyan úgy kell. 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