CODE |
public static void GenericCommand_OnCommand( CommandEventArgs e ) { EventSink.InvokeHelpRequest(new HelpRequestEventArgs(e.Mobile)); } |
QUOTE (ArteGordon @ Feb 18 2006, 01:25 PM) | ||
you can make a command that will bring up the help gump easily enough. Just use something like this as your command code.
|
CODE |
using System; using System.Text; using Server; using Server.Items; using Server.Network; using System.Collections; using Server.Mobiles; using Server.Multis; namespace Server.Scripts.Commands { public class GenericCommand { public static void Initialize() { Server.Commands.Register( "p", AccessLevel.Player, new CommandEventHandler( GenericCommand_OnCommand ) ); } if ( from.Region is Server.Regions.Jail ) { from.SendMessage( "you cant do this.", 0x35, true ); // You'll need a better jailbreak plan then that! } else if { public static void GenericCommand_OnCommand( CommandEventArgs e ) { EventSink.InvokeHelpRequest(new HelpRequestEventArgs(e.Mobile)); } } } } |
CODE |
if ( from.Region is Server.Regions.Jail ) { from.SendMessage( "you cant do this.", 0x35, true ); // You'll need a better jailbreak plan then that! } else if { |
CODE |
public static void GenericCommand_OnCommand( CommandEventArgs e ) { // has to go inside here } |
CODE |
using System; using System.Text; using Server; using Server.Items; using Server.Network; using System.Collections; using Server.Mobiles; using Server.Multis; namespace Server.Scripts.Commands { public class PageatCommand { public static void Initialize() { Server.Commands.Register( "p", AccessLevel.Player, new CommandEventHandler( PageatCommand_OnCommand ) ); } public static void PageatCommand_OnCommand( CommandEventArgs e ) { if ( from.Region is Server.Regions.Jail ) { from.SendMessage( "you cant do this.", 0x35, true ); // You'll need a better jailbreak plan then that! } else if { EventSink.InvokeHelpRequest(new HelpRequestEventArgs(e.Mobile)); } } } } |
CODE |
- Error: Scripts\Custom\pageat.cs: CS1003: (line 25, column 8) Syntax error, ' ' expected - Error: Scripts\Custom\pageat.cs: CS1525: (line 26, column 1) Invalid express on term '{' - Error: Scripts\Custom\pageat.cs: CS1026: (line 26, column 2) ) expected - Error: Scripts\Custom\pageat.cs: CS1514: (line 27, column 67) { expected |
CODE |
else if { EventSink.InvokeHelpRequest(new HelpRequestEventArgs(e.Mobile)); } |
CODE |
using System; using System.Text; using Server; using Server.Items; using Server.Network; using System.Collections; using Server.Mobiles; using Server.Multis; namespace Server.Scripts.Commands { public class PageatCommand { public static void Initialize() { Server.Commands.Register( "p", AccessLevel.Player, new CommandEventHandler( PageatCommand_OnCommand ) ); } public static void PageatCommand_OnCommand( CommandEventArgs e ) { if ( from.Region is Server.Regions.Jail ) { Mobile from = e.Mobile; from.SendMessage( "you cant do this.", 0x35, true ); // You'll need a better jailbreak plan then that! } else { EventSink.InvokeHelpRequest(new HelpRequestEventArgs(e.Mobile)); } } } } |
CODE |
- Error: Scripts\Custom\pageat.cs: CS0246: (line 21, column 7) The type or name space name 'from' could not be found (are you missing a using directive or an as sembly reference?) |
CODE |
( from.Region is Server.Regions.Jail ) { Mobile from = e.Mobile; |