Thread: player.join()
View Single Post
  #6  
Old 02-21-2007, 03:30 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Rapidwolve View Post
On the Control-NPC under onActionPlayerOnline(), I added a line 'player.join("player");' In the class 'player' I made a public function we'll call it sayChat(message). In another player weapon I have player.sayChat("test"), but all I get is an error the F2 window saying function rapidwolve.sayChat() not found... blah blah...I searched forums on this and nothing worked. I know this can be done as I have seen it done before. Can anybody help?
There's no reason it shouldn't work. I have something like this in my Control-NPC ... player.join( "player-functions" );

I admit I've never done anything on it clientside, but I don't see why it shouldn't work. I'll post some examples for you to look at ...

in control NPC
PHP Code:
function onActionPlayerOnline()
{
  
player.join"player" );

in the class 'player'
PHP Code:
//#CLIENTSIDE
public function setChatsetchat )
{
  
player.chat setchat;

in some script
PHP Code:
//#CLIENTSIDE
function onCreated()
{
  
player.setChat"blah" );

[Edit: If this doesn't work, maybe you could try joining clientside in a system NPC?]
__________________
Reply With Quote