[HL2:DM] Webshortcut
Posted: Thu Jan 05, 2017 4:44 pm
Can anybody create a Webshortcutlist?
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?
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
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')
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