Hooks CharacterKicked - brianhang/nutscript2 GitHub Wiki
Description
CharacterKicked(character, client, reason)
This server hook is called when Character:kick has been used to eject a player from their character. At this point, client does not have an active character.
Parameters
| Name | Description |
|---|---|
character |
The Character that was affected. |
client |
The Player that was kicked from character. |
reason |
A string that contains the reason why the character was kicked. Note that this may be an empty string. |
Example
-- Notify the player why they have been kicked from their character.
function GM:CharacterKicked(character, client, reason)
if (reason == "") then
reason = "no reason"
end
client:ChatPrint("You have been kicked from your character for "..reason)
end