Thread: NPC Help
View Single Post
  #2  
Old 08-28-2011, 10:52 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
What/How kind/much data are you trying to send the client-side?

You can easily use attributes to make strings of data available on the client-side. I.e:

PHP Code:
function onCreated() {
  
this.attr[2] = "Hello world!";
}

//#CLIENTSIDE

function onPlayerEnters() {
  
this.chat this.attr[2]; // NPC will chat "Hello World!"

You may encounter issues if your setting data that is longer than 200 characters, but that's still a fair chunk available and there's still 30 (or 31?) attributes available.

If you need something more complicated you'll need to triggerclient to a weapon, and set it in the NPC.
__________________
Quote:
Reply With Quote