Blockland Forums > Modification Help

How do you client-sidedly...?

Pages: (1/3) > >>

Lugnut:

Which function is called when you spawn, or otherwise, how would I cause actions to happen when I spawn?
Is there a way to measure distance to an object by looking at it client sidedly?

CityRPG:

1. Not 100% sure. Run a trace before it says "Click to spawn." and see what happens. I'm sure there is one.

2. No. There is server-side, but Badspot disabled most mathematical functions relating to players because of aimbot scripts.

Chrono:


--- Quote from: Lugnut1206 on February 04, 2012, 08:29:55 PM ---how would I cause actions to happen when I spawn?

--- End quote ---
A 'HandleYourSpawn' callback.

Lugnut:

Also:My apologies about the ambiguous title.

Slicksilver:

There is probably a better way to handle your client spawning than parenting a low level function, but I'm not about to go trace for it so here you are:

--- Code: ---package WhenISpawn {
function serverConnection::setControlObject(%this, %obj)
{
%return = parent::setControlObject(%this, %obj);
if(%obj.getClassname() $= "Player")
whenISpawn();
return %return;
}
};
activatePackage(WhenISpawn);

--- End code ---
Only issue is this will probably catch when you hit f7 as an admin. Too lazy to check for a better function.

Pages: (1/3) > >>

Go to full version