Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-26-2006, 01:28 AM
pig132 pig132 is offline
professional troll
Join Date: May 2006
Posts: 260
pig132 will become famous soon enough
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..
Reply With Quote
  #2  
Old 08-26-2006, 01:37 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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?)
Reply With Quote
  #3  
Old 08-26-2006, 02:43 AM
Omini Omini is offline
Millenium Owner
Join Date: Feb 2006
Location: N.Ireland
Posts: 293
Omini is on a distinguished road
Send a message via AIM to Omini Send a message via MSN to Omini Send a message via Yahoo to Omini
Only thing I can think of, that I think you're wanting is this:

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

__________________



Reply With Quote
  #4  
Old 08-26-2006, 05:56 PM
pig132 pig132 is offline
professional troll
Join Date: May 2006
Posts: 260
pig132 will become famous soon enough
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");
}

Reply With Quote
  #5  
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
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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