Entire law list with one key?
#1
Are multiple commands able to be executed from one key, I'd like a format or something on how to press a key like Numkey 7 and execute my entire list of laws.
 
 
#2
I'd highly go against this.

With Source Engine in particular, your dev console won't remind you on the character limit given in your chat messages - so if you go over the limit, all it would do is just cut out the parts that go over the limit.
#3
Look into using autohotkey to automatically send a list of your laws using a command.

Griim has made a guide here:
http://www.fearlessrp.net/showthread.php?tid=48263
The following 2 users Like evilmat360's post:
  • MacTavish, Marty
#4
Using one key for more than 10 commands at a time (in this case, laws) is not recommended.

To help prevent overloading, the server will kick you if you try to execute any file which has more than 10ish commands to carry through, with a message of "client X exceeded reliable client overflow" or something like this.

It's a little complex to work your head around at first, but as Evilmat suggested, have a look at Griim's guide to autohotkey.
 
#5
(06-09-2015, 01:35 PM)Safira Wrote: Using one key for more than 10 commands at a time (in this case, laws) is not recommended.

To help prevent overloading, the server will kick you if you try to execute any file which has more than 10ish commands to carry through, with a message of "client X exceeded reliable client overflow" or something like this.

It's a little complex to work your head around at first, but as Evilmat suggested, have a look at Griim's guide to autohotkey.

What if say the autohotkey program has like a delay in-between the laws being added, like the same time it would take to copy and paste the laws yourself? It would just like copying pasting them yourself.
#6
you can do it using an exec file.

@doctorinternetplsposthere
Kind Regards,
Wood.
#7
in console
alias law1 say /addlaw blaa; bind key law2
alias law2 say /addlaw blaa blaa; bind key law3
etc etc
bind key law1
replace key. press key to get law. give it a few seconds delay, press key again.



For config files....

C:\Program Files (x86)\Steam\SteamApps\common\GarrysMod\garrysmod\cfg
Make a file called laws.cfg
Add your laws.
For example
Code:
cityrp addlaw ---[[ The Laws, Rights and Constitution of EvoCity ]]--
cityrp addlaw -- Chapter 1, The Constitution --
cityrp addlaw Under the First Chapter, all Citizens are given their unalienable rights.
cityrp addlaw However, these rights may be removed, only under the exceptions stated in the chapter.
cityrp addlaw The offices of the Government are defined also defined.
Save.

In console, while in game, type exec laws1.
Give it time to post, then repeat until all laws are posted.
Do not put more than 5 laws in a file, since it causes server lag. At higher numbers, it can cause a buffer overflow, and crash you.

Source: Have done it before. Not fun.
Yours
Doctor Internet;

Developer, Systems Operator,
Data Protection Officer, Business Advisor,
Server Administrator, Community Moderator
The following 3 users Like Doctor Internet's post:
  • GRiiM, Dauntless, Cody


Forum Jump:


Users browsing this thread: 1 Guest(s)