View Single Post
  #15  
Old 01-08-2007, 10:07 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Quote:
Originally Posted by xXziroXx View Post
Ok, so, im trying to set another player's string to a value, but it wont work.


PHP Code:
with (findPlayer(this.target[1])) client.tradereq playero.id
this.target[1] equals the targets account name, so theres no problem there. What happens with this is that instead of setting the targets client.tradereq, it sets it on the current player.

PHP Code:
with (findPlayer(this.target[1])) player.chat "Trying to set your chat!"
That works perfectly fine, so theres no problem in accessing the player.. Ive had -alot- of player-to-player communication errors on Mythic, stuff that works on other servers wont work on there..

Any ideas about whats wrong?
Bah. Just run it serverside.

PHP Code:
function onActionServerSide(cmd)
{

  switch(
cmd)
  {

    case 
"setchat":
    {
      
      
with(getplayer(params[1])) player.chat "Trying to set your chat!";

    break;
    
    }

  }

}

//#CLIENTSIDE
function onPlayerChats()
{

  if (
player.chat.starts("/find"))
  {

    
triggeraction(00"serverside"namesetchatplayer.chat.substring(6,-1));

  }


That should work
Reply With Quote