View Single Post
  #12  
Old 05-16-2011, 01:38 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by fowlplay4 View Post
This seemed to work for me:

wNPC A:

PHP Code:
function onCreated() {
  
this.join("test");
}

//#CLIENTSIDE

function onCreated() {
  
this.leave("test"); // Not really necessary.
  
player.join("test");

wNPC B:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
player.hello();

Class: test

PHP Code:
//#CLIENTSIDE
public function hello() {
  
player.chat "world.";

Looks like it also resolves the 'have to restart client to update' issue as well. Just make sure A loads first, which should be as easy as placing it first in weaponsorder in server options.
Funnily enough before deciding to test this I tested the normal situation of logging in having restarted the client while containing a player.function clientside within weapon + NPC scripts onCreated, and the function happened to work each time, so I think this is only really a problem when lag is involved.
Reply With Quote