Author Topic: Hostages  (Read 1084 times)

Possible to make it so you can enter a slash command, then have the value you entered be stored in an accessible menu that you can edit through slash commands? Example: type /addfriend Miga, and until you leave the server, you have a list you can see through /friendlist that displays everyone you entered through /addfriend, then you can delete friends by typing /deletefriend <name>.
« Last Edit: October 01, 2007, 11:49:25 AM by VerticalHorizon »

I don't think you can make client sided slash commands.

Sure you can. It'd be in the MessageHud_Eval function or something. I don't know how the new message box works so it might use another function.

What if the hoster of the mod has a .txt created after he/she enters a mod starter command such as /friendlistarchive, it stores all the friends each member entered so when they come back they still exist. I'm not using this for a friend list, but I think the friend list idea is the closest.

I don't get what you need help with.

I want a hostage thing, when someone enters /hostage <player> the player is added to the enterer's hostage list, while on that list the victim is forced to follow the criminal, when the criminal enters /nohostage the player is set free, if the criminal enters /killhostage he kills the player.

Excerpt from my Ignore script (unreleased...) allowing me to type /ignoreName [words] or /ignoreClan [words]:

Code: [Select]
package Ignore
{
 //....OTHER CODE....
 function NMH_Type::send(%this)
 {
  if(firstWord(%this.getValue()) $= "/ignoreName")
  {
   ignoreName(restWords(%this.getValue()));canvas.popDialog(newMessageHUD);return;
  }
  if(firstWord(%this.getValue()) $= "/ignoreClan")
  {
   ignoreClan(restWords(%this.getValue()));canvas.popDialog(newMessageHUD);return;
  }
  Parent::send(%this);
 }
};activatepackage(Ignore);

However, the message box doesn't close after you push Enter... You have to push Escape.

----
Warning - while you were typing a new reply has been posted. You may wish to review your post.
----

Killing players won't work clientside...
« Last Edit: October 01, 2007, 11:51:44 AM by Space Guy »