Author Topic: /\ Need help!  (Read 3506 times)


What is the player death functions?
And other functions please tell me

Try using dumpConsoleFunctions(); and clientGroup.getObject(0).dump();


What did i do wrong here?

function servercmdkill(%client)
{
 %name = %client.getPlayerName();
 %player = %client.player;

 %player.kill();
}
function servercmdtest(%client)
{
      Messageclient(%client,'',"<color:C9061A><font:Impact:40>Hydro it's working fine.");

}
activatePackage("Dead");
}
function gameConnection::onDeath(%victim, %sourceObject, %sourceClient, %damageType, %position)
{
Messageclient(%client,'',"<color:C9061A>You are dead.");
};

Code: [Select]
function servercmdkill(%client)
{
%name = %client.getPlayerName();
%player = %client.player;

%player.kill();
}

function servercmdtest(%client)
{
Messageclient(%client,'',"<color:C9061A><font:Impact:40>Hydro it's working fine.");
}

activatePackage("Dead"); //<-- Why is this here? Did you incorrectly make a package?
} // <-- Random bracket?

function gameConnection::onDeath(%victim, %sourceObject, %sourceClient, %damageType, %position)
{
Messageclient(%client,'',"<color:C9061A>You are dead.");
}; // <-- Random semi-colon?

Did you mean to do this?
Code: [Select]
function servercmdkill(%client)
{
%name = %client.getPlayerName();
%player = %client.player;

%player.kill();
}

function servercmdtest(%client)
{
Messageclient(%client,'',"<color:C9061A><font:Impact:40>Hydro it's working fine.");
}

package Dead
{
function gameConnection::onDeath(%victim, %sourceObject, %sourceClient, %damageType, %position)
{
parent::onDeath(%victim, %sourceObject, %sourceClient, %damageType, %position);
Messageclient(%client,'',"<color:C9061A>You are dead.");
}
};
activatePackage(Dead);
« Last Edit: December 06, 2013, 02:58:14 PM by Honorabl3 »

So, This will work? :
function servercmdkill(%client)
{
   %name = %client.getPlayerName();
   %player = %client.player;
   
   %player.kill();
}

function servercmdtest(%client)
{
   Messageclient(%client,'',"<color:C9061A><font:Impact:40>Hydro it's working fine.");
}

function gameConnection::onDeath(%victim, %sourceObject, %sourceClient, %damageType, %position)
{
   Messageclient(%client,'',"<color:C9061A>You are dead.");
}

I reeditted my post, please look at it..

What i tried to make, Is so when they die, It says you are dead.

I was right then. This from above should work fine.
Code: [Select]
function servercmdkill(%client)
{
%name = %client.getPlayerName();
%player = %client.player;

%player.kill();
}

function servercmdtest(%client)
{
Messageclient(%client,'',"<color:C9061A><font:Impact:40>Hydro it's working fine.");
}

package Dead
{
function gameConnection::onDeath(%victim, %sourceObject, %sourceClient, %damageType, %position)
{
parent::onDeath(%victim, %sourceObject, %sourceClient, %damageType, %position);
Messageclient(%client,'',"<color:C9061A>You are dead.");
}
};
activatePackage(Dead);

Make sure /kill checks to see if the player even exists so you don't get console spam saying "Unable to find object".

function servercmdkill(%client)
{
   if(isObject(%player = %client.player))
      %player.kill();
}


%name isn't really needed, it seems. So I removed it.

I was right then. This from above should work fine.
Code: [Select]
function servercmdkill(%client)
{
%name = %client.getPlayerName();
%player = %client.player;

%player.kill();
}

function servercmdtest(%client)
{
Messageclient(%client,'',"<color:C9061A><font:Impact:40>Hydro it's working fine.");
}

package Dead
{
function gameConnection::onDeath(%victim, %sourceObject, %sourceClient, %damageType, %position)
{
parent::onDeath(%victim, %sourceObject, %sourceClient, %damageType, %position);
Messageclient(%client,'',"<color:C9061A>You are dead.");
}
};
activatePackage(Dead);



That doesn't work.

It doesn't say it when i die.

Try changing gameConnection to armor.

Whats the armour code?
armour:: ?