View Full Version : Clientside player-joined class

01-19-2006, 10:04 PM
Alright, people keep telling me that clientside portions of player-joined classes work.
I can't get them to.
Can anyone tell me what I'm doing wrong, or how to do it right? I've tried both 'function' and 'public function'
Nothing is happening.

function onPlayerChats() {
chat = "Zomg";

public function Clamp(value,clamp) {
inc = clamp / 2;
nval = value % clamp;
if (nval >= inc) value += (clamp - nval);
else value -= nval;
return value;

01-20-2006, 01:28 AM
-Tapsfoot.- I'm gonna bump, just incase people are only looking at the topic on top.. I need a kinda-quick answer.

01-20-2006, 04:12 PM
That code is in a weapon script and you call Clamp() from another npc or so ?

01-20-2006, 08:49 PM
That code is in a class.
The class is joined to the player by the Control-NPC.
The weapon is trying to call 'player.Clamp()'

01-21-2006, 02:16 AM
I love you, Stefan :)

01-27-2006, 02:37 PM
Only weapons and npcs can have clientside code.