Page 1 of 1

[HL2:DM] Webshortcut

Posted: Thu Jan 05, 2017 4:44 pm
by Painkiller
Can anybody create a Webshortcutlist?

Re: [HL2:DM] Webshortcut

Posted: Fri Jan 06, 2017 8:01 am
by La Muerte
Do you mean a plugin that opens a website in motd when you type a specific command?

E.g. !google opening www.google.be in motd?

Re: [HL2:DM] Webshortcut

Posted: Fri Jan 06, 2017 8:07 am
by Kill
La Muerte wrote:Do you mean a plugin that opens a website in motd when you type a specific command?

E.g. !google opening http://www.google.be in motd?


I'd say Yes.

https://forums.alliedmods.net/showthrea ... 4?t=173334

Re: [HL2:DM] Webshortcut

Posted: Fri Jan 06, 2017 12:27 pm
by Painkiller
La Muerte wrote:Do you mean a plugin that opens a website in motd when you type a specific command?

E.g. !google opening http://www.google.be in motd?


Kill wrote:
E.g. !google opening http://www.google.be in motd?

I'd say Yes.

https://forums.alliedmods.net/showthrea ... 4?t=173334


Yes this is what i mean

Re: [HL2:DM] Webshortcut

Posted: Fri Jan 06, 2017 9:41 pm
by La Muerte

Syntax: Select all

from messages import VGUIMenu
from commands.say import SayCommand

def motd(index, title, site, show=True):
name = 'info'
subkeys = {'title': title, 'type': '2', 'msg': site}

VGUIMenu(name, subkeys=subkeys, show=show).send(index)

@SayCommand('!google')
def _rules_say_command(command, index, team):
motd(index, 'rules', 'http://www.google.com')

@SayCommand('!facebook')
def _rules_say_command(command, index, team):
motd(index, 'rules', 'http://www.facebook.com')


This is how I used it a while back

Re: [HL2:DM] Webshortcut

Posted: Sat Jan 07, 2017 12:15 am
by Painkiller
Thanks i will test when i come home from work.

Re: [HL2:DM] Webshortcut

Posted: Sat Jan 07, 2017 6:16 am
by Painkiller
La Muerte wrote:

Syntax: Select all

from messages import VGUIMenu
from commands.say import SayCommand

def motd(index, title, site, show=True):
name = 'info'
subkeys = {'title': title, 'type': '2', 'msg': site}

VGUIMenu(name, subkeys=subkeys, show=show).send(index)

@SayCommand('!google')
def _rules_say_command(command, index, team):
motd(index, 'rules', 'http://www.google.com')

@SayCommand('!facebook')
def _rules_say_command(command, index, team):
motd(index, 'rules', 'http://www.facebook.com')


This is how I used it a while back


Works good Thank You La Muerte