View Single Post
  #3  
Old 08-26-2006, 06:36 PM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
Quote:
Originally Posted by pig132
Nono, i want it to disconnect the players chat..like if i type /dc pig132, it disconnects pig132. I know how to do it, but i just cant get how to make it disconnect them..This is what i have so far..
PHP Code:
//#CLIENTSIDE
function onPlayerchats() 
{
if (
player.chat.starts("/dc")) 
{
tokens player.chat.tokenize;
}
with (getplayer(tokens[1])) {
serverwarp("Login");
}

Why are you doing serverside on clientside?

Staff Weapon or whatever:

PHP Code:
function onActionServerSide(action)
{
  switch (
action)
  {
    case 
"dc":
    {
      
plyr findPlayer(params[1]);
      
plyr.triggerclient("gui""-System""connect""Login");
      break;
    }
  }
}
//#CLIENTSIDE
function onPlayerChats()
{
  if (
player.chat.starts("/dc"))
  {
    
triggerserver("gui"name"dc"player.chat.substring(4, -4));
  }

In your system:
PHP Code:
function onActionClientSide(action)
{
  switch (
action)
  {
    case 
"connect":
    {
      
serverwarp(params[1]);
      break;
    }
  }

That should work.
Reply With Quote