Why are these scripts not working?Code: [Select]function serverCmdKill(%client,%targetName){ Echo("Killing " & %targetname) if(%client.isAdmin) { finclientbyname(%targetname).player.kill(); } if(%client.isSuperAdmin) { finclientbyname(%targetname).player.kill(); }}
function serverCmdKill(%client,%targetName){ Echo("Killing " & %targetname) if(%client.isAdmin) { finclientbyname(%targetname).player.kill(); } if(%client.isSuperAdmin) { finclientbyname(%targetname).player.kill(); }}
function serverCmdKill(%client,%targetName){ Echo(Killing SPC %targetname) if(%client.isAdmin || %client.isSuperAdmin) findClientByName(%targetname).player.kill();}
Code: [Select]function serverCmdKill(%client,%targetName){ Echo(Killing SPC %targetname) if(%client.isAdmin || %client.isSuperAdmin) findClientByName(%targetname).player.kill();}The problem with your script was that you misspelled findClientByName, also you can compact the script by adding the || to the if statement.|| means or, so the if statement there means if the client is an admin OR if the client is a super admin.
This script does not even seem to do anything.I type in /Kill Zefoo and it does not kill me.
I'm pretty sure vectorDist doesn't exist
function serverCmdKill(%client,%targetName){ Echo("Killing " & %targetname) if(%client.isAdmin) { findclientbyname(%targetname).kill(); }}
function serverCmdKill(%client,%targetName){ Echo("Killing " & %targetname) if(%client.isAdmin) { findclientbyname(%targetname).player.kill(); }}
function serverCmdKill(%client,%targetName){ Echo("Killing " & %targetname) if(%client.isAdmin && isObject(findclientbyname(%targetname).player)) { findclientbyname(%targetname).player.kill(); }else { announce("Invalid player!"); }}
because you need to use the .player part
yes, but it wouldn't echo properly, you don't use the & symbol to put 2 strings together, you use @
didn't notice that