View Single Post
  #7  
Old 08-07-2010, 01:20 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
When you join something you're basically copying and pasting the code into that weapon. If you join it to the player you can add extra functions to the player (like player.unstick()) but you can't use stuff like onKeyPressed and onPlayerChats which aren't events of the player.

Your code should look like this (and be in a weapon):

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

//#CLIENTSIDE
function onCreated() {
  
player.chat "it works!";

__________________
Reply With Quote