The forget is up with this code?
%trans = %obj.getTransform();
if(!strLen(%trans))
%trans = %killer.getTransform();
Why are you spawning bodies at the position of the killer player if it exists, and if it doesn't, the position of the client who killed them? If the killer's player is alive, bodies spawn at the killer. If they aren't, two errors are displayed and the bodies spawn at 0 0 0.
if(isObject(%obj.tempbrick))
%obj.tempbrick.delete(); //Make sure we don't have this glitch
So whenever I kill somebody, my ghost brick disappears? Makes sense..
function serverCmdUseTool(%this,%slot)
{
if(%this.isDown)
return;
Parent::serverCmdUseTool(%this,%slot);
}
Uhh.. they don't have a player anyway, you deleted it.
Parent::onDeath(%this,%obj,%killer,%type,%area);
You are deleting the player before calling this function. This means errors every time somebody dies.
%body.clearTools();
Just.. no.
if(!%player.corpse)
%player.addHealth(-%vel);
Why would a non-corpse player be mounted to the corpse vehicle..?
I could go on and on about several other things, but I think you get the point.