Poll

How are you?

GREAT
Good
okay
I'm ugly
lovey

Author Topic: Command Help  (Read 1253 times)

What would I type in message all except to exclude the target? I have an idea to fix the spawn check.

Now it is syntaxing and it says this is the problem };##
##activatepackage(kill);

Here's the code

Code: [Select]
package kill
{
function servercmdkill(%client, %user)
{
if(%client.isSuperAdmin == false)
{

messageClient(%client, '', '\c6You must be a super admin to use this command.');

return;
}
if(%user !$= "")
{
%target = findClientByName(%user).player;
%targetC = findClientByName(%user);
if(!isObject(%target.player))
{
%target.kill();
messageAll("",'\c3%1 \c6was force killed by \c3%2', %targetC.name, %client.name);
messageClient(%targetC, '', '\c3%1 \c6has force killed you.', %client.name);
}
else
{
messageClient(%client, '', '\c6That player hasnt spawned yet!', %user);

return;
}
}
};##
##ActivatePackage(kill);

Well I went back to the basics and did this:

if(!isObject(%target) == true)
      {

      messageClient(%client, '', '\c6That player hasnt spawned yet!', %user);

      return;
      }
   }
};

that makes the spawn check work but I need to make it cancel the message All. How do I make it cancel that?


You don't even need a package...

Well I fixed it already and it works perfectly. So FIXED