ChrisT Posted December 8, 2019 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
WorthlessCynomys Posted December 8, 2019 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 )
Moderators Patrick Posted December 15, 2019 Moderators 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.
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