Hey,
Ich möchte wenn ich jemanden gekickt habe ein Text erscheint z.B. : Peter wurde gekickt. Grund: Er ist einfach nur ein Noob
Wäre das bei mir jetzt richtig?
function kickPlayerHandler ( sourcePlayer, commandname, kickedname, reason )
-- Get player element from the name
local kicked = getPlayerFromNick ( kickedname )
-- If the client who sent the command has a higher level
if ( hasObjectPermissionTo ( sourcePlayer, "function.kickPlayer" ) ) then
-- Kick the player
kickPlayer ( kicked, sourcePlayer, reason )
outputChatBox(..getPlayerName(kickedname).."wurde gekickt. Grund:"..reason..)
end
end
-- Add the "kick" command handler
addCommandHandler ( "kick", kickPlayerHandler )