Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Player classes (https://forums.graalonline.com/forums/showthread.php?t=77455)

oo_jazz_oo 11-06-2007 01:06 AM

Player classes
 
I am having trouble with player classes. I have asked many people, but they can't seem to find out whats wrong.
Heres my test scripts:

class 'playert1':
PHP Code:

//#CLIENTSIDE
function Test()
{
  
this.chat "test";


weapon 'Test':
PHP Code:

//#CLIENTSIDE
function onCreated()
  
player.join("playert1");

function 
onWeaponFired()
  
player.Test(); 

Now, alot of people told me not to join classes clientside, but I have tried joining the class serverside, when the player logs on, etc.
And it still didnt work. The problem is the class isnt being joined...
And idk why not, when I echo player.joinedclasses it only echoes startgui,
So, i'm not sure why the class isnt being joined. Any help?

xAndrewx 11-06-2007 08:30 PM

use

HTML Code:

this.join("playert1");
Make it serverside also.

Skyld 11-06-2007 08:46 PM

Quote:

Originally Posted by xAndrewx (Post 1356728)
use

HTML Code:

this.join("playert1");
Make it serverside also.

Not quite.
PHP Code:

player.join("classname"); 

... is correct.

Your functions need to be public though I think, and yeah, they tend to be so much more useful on the serverside.

oo_jazz_oo 11-06-2007 08:47 PM

Well, the function in the class is public, I just didnt add that cause....idk why. sorry >_<
I join the class when th eplayer logs in, I echo joined classes, nothing....
So, idk why the class istn joining.


All times are GMT +2. The time now is 10:08 PM.

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