View Single Post
  #1  
Old 08-20-2013, 09:09 PM
JohnnyChimpo JohnnyChimpo is offline
Registered User
JohnnyChimpo's Avatar
Join Date: Jun 2004
Posts: 105
JohnnyChimpo is on a distinguished road
Player Classes and Level NPCs

So i have a class that controls player functions and used the NPC Control to apply this class to all players that log in. I have also made -Message weapon and connected the same player functions to that weapon ( this is for if i call it in a level NPC on clientside). However when i use the player.funct(); on serverside, and say i need that funct() to trigger clientside to display a showtext or something, it gets to the serverside funct() but doesnt go through the trigger. Why would this be? Here is my player_functions class.

Note: The weapon works fine.

PHP Code:
public function sendMsg(){
echo(
"Triggering from serverside");
//this.chat= "hello";
triggerClient("gui"this.name"msg");
}
//#CLIENTSIDE
function onActionClientSide(cmd){
  
this.chat "Hello";
  echo(
"made it");
  
}
public function 
sendMsg(){
echo(
"toast1");

Reply With Quote