Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Clientside player-joined class (https://forums.graalonline.com/forums/showthread.php?t=63562)

Yen 01-19-2006 10:04 PM

Clientside player-joined class
 
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.

PHP Code:

//#CLIENTSIDE
function onPlayerChats() {
  
chat "Zomg";
}

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



Yen 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.

Admins 01-20-2006 04:12 PM

That code is in a weapon script and you call Clamp() from another npc or so ?

Yen 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()'

Yen 01-21-2006 02:16 AM

I love you, Stefan :)

Admins 01-27-2006 02:37 PM

?
Only weapons and npcs can have clientside code.


All times are GMT +2. The time now is 09:02 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.