mirror of
https://github.com/Resxt/Plutonium-IW5-Scripts.git
synced 2025-04-20 04:55:43 +00:00
41 lines
606 B
Plaintext
41 lines
606 B
Plaintext
#include scripts\chat_commands;
|
|
|
|
Init()
|
|
{
|
|
CreateCommand(level.chat_commands["ports"], "kick", "function", ::KickCommand, 4, ["default_help_one_player"], ["k"]);
|
|
}
|
|
|
|
|
|
|
|
/* Command section */
|
|
|
|
KickCommand(args)
|
|
{
|
|
if (args.size < 1)
|
|
{
|
|
return NotEnoughArgsError(1);
|
|
}
|
|
|
|
error = KickPlayer(args[0]);
|
|
|
|
if (IsDefined(error))
|
|
{
|
|
return error;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* Logic section */
|
|
|
|
KickPlayer(playerName)
|
|
{
|
|
player = FindPlayerByName(playerName);
|
|
|
|
if (!IsDefined(player))
|
|
{
|
|
return PlayerDoesNotExistError(playerName);
|
|
}
|
|
|
|
Kick(player GetEntityNumber());
|
|
} |