View Single Post
  #4  
Old 05-23-2009, 06:52 PM
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
Quote:
Originally Posted by Pelikano View Post
You can't do onPlayerChat() serverside inside a Weapon and I think what you suggested won't work either. (If I understood the poster correct)

If I understood you correct, you want to be able to say something and something happens inside the weapon of another player, without you having that or any other weapon related to it?
I think that's impossible, since onPlayerChat() is clientside only in Weapons.

You'd need to have the Weapon too.
You don't understand what I did. onRemotePlayerChats is called when (thanks Chompy) someone else in the level says something. This would have to be put in the weapon that all players have, and then when that player chats, it would check what they said, and do the correct thing. I guess if he did mean what you think, it would be like

PHP Code:
function onActionServerSide(cmdacc) {
  switch (
cmd) {
    case 
"summon": {
      
findPlayerByCommunityName(acc).setlevel2(player.level.nameplayer.xplayer.y);
      break; 
// etc
    
}
  }
}
//#CLIENTSIDE
function onPlayerChats() {
  
temp.cmds = {"summon""disconnect"};
  
  
temp.tokens player.chat.tokenize();
  if (
tokens[0].substring(1in cmds) {
    
triggerserver("gui"nametokens[0].substring(1), tokens);
  }

__________________
Reply With Quote