Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Disconnection through weapon? (https://forums.graalonline.com/forums/showthread.php?t=68354)

pig132 08-26-2006 01:28 AM

Disconnection through weapon?
 
I'm not sure on how/which command you would use to use a players chat to disconnect a player. Anyone help? I tried sendtorc /disconnect blah but it didnt work..

Admins 08-26-2006 01:37 AM

I think it's possible to reset but not disconnect. We have added sendtext-functionality for disconnect and reset on Rudora though, it's not enabled for the npcserver yet though (should it be enabled or may be only when the rights of the npcserver contain disconnect right and reset right?)

Omini 08-26-2006 02:43 AM

Only thing I can think of, that I think you're wanting is this:

PHP Code:

function onPlayerchats()
  {
  if (
player.chat == "/disconnect") {
    
serverwarp("Login");
  }



pig132 08-26-2006 05:56 PM

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");
}



KuJi 08-26-2006 06:36 PM

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.


All times are GMT +2. The time now is 10:00 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.