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