check if the player object exists too, otherwise console will return an error:
Edit: Also, getting the full players name in the message all function is more efficient :p
Edit x2: also notifying client if player doesnt exist
function serverCmdKill(%client, %target)
{
if(%client.isSuperAdmin)
{
%player = findClientByName(%target).player;
if(isObject(%player))
{
messageall('',"\c3" @ %player.client.name SPC "\c6has been forcekilled.");
%player.kill();
}
else
messageclient(%client,'',"\c6Player not found.");
}
}
sorry for being so overly complicated, its in my nature lol