View Single Post
  #2  
Old 08-20-2013, 03:54 AM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
To trigger back the clientside, you can do

player.triggerClient("gui", weaponNameHere, "parameter", "parameter", ...)

then on the clientside part you can have something like
PHP Code:
function onActionClientSide() {
  
//do any checks you want, then trigger your deserved function

And no, you cant just do triggerServer()/triggerClient() within NPCs as I remember. You would need to use triggerAction(x, y, "Test", "Hello") which can be seen by using
PHP Code:
function onActionTest() {
  
this.chat params[0];

make sure to set a shape (setshape() or setshape2())to the NPC when using triggerAction(), else it wont work
__________________
MEEP!
Reply With Quote