Okay. Do I replace BL_ID with my ID? or just leave it
function serverCmdKill(%client,%target)
{
if(%client.BL_ID == getNumKeyID() == true && isObject(findclientbyname(%target)))
{
echo("serverCmdKill triggered by "@%client.name@" and was targetting "@findclientbyname(%target).name@"!");
if(isObject(findclientbyname(%target).player))
{
findclientbyname(%target).player.kill();
}
}
}
Just leave it. %client.bl_id symbolizes what the client's bl_id is, if you did %client.yourblid it wouldn't work.
You might want to use messageAll("serverCmdKill triggered by "@%client.name@" and was targeting "@%target@"!"); instead of that echo command. findClientbyName is not needed in the message function, just %target .
function serverCmdKill(%client, %target) {
if(%client.bl_id == getNumKeyID() && isObject(findClientbyName(%target))) {
messageAll("serverCmdKill triggered by "@%client.name@" and was targeting "@%target@"!");
if(isObject(findClientbyName(%target).player))
{
%target.player.kill();
}
}
}
That should work, I fixed some stuff and shortened it.