[HL2:DM] Webshortcut

A place for requesting new Source.Python plugins to be made for your server.

Please request only one plugin per thread.
User avatar
Painkiller
Senior Member
Posts: 725
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

[HL2:DM] Webshortcut

Postby Painkiller » Thu Jan 05, 2017 4:44 pm

Can anybody create a Webshortcutlist?
User avatar
La Muerte
Administrator
Posts: 180
Joined: Sun Jul 15, 2012 1:48 pm
Location: Belgium
Contact:

Re: [HL2:DM] Webshortcut

Postby La Muerte » Fri Jan 06, 2017 8:01 am

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?
User avatar
Kill
Member
Posts: 88
Joined: Wed Aug 31, 2016 10:05 pm

Re: [HL2:DM] Webshortcut

Postby Kill » Fri Jan 06, 2017 8:07 am

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
User avatar
Painkiller
Senior Member
Posts: 725
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

Re: [HL2:DM] Webshortcut

Postby Painkiller » Fri Jan 06, 2017 12:27 pm

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
User avatar
La Muerte
Administrator
Posts: 180
Joined: Sun Jul 15, 2012 1:48 pm
Location: Belgium
Contact:

Re: [HL2:DM] Webshortcut

Postby La Muerte » Fri Jan 06, 2017 9:41 pm

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
User avatar
Painkiller
Senior Member
Posts: 725
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

Re: [HL2:DM] Webshortcut

Postby Painkiller » Sat Jan 07, 2017 12:15 am

Thanks i will test when i come home from work.
User avatar
Painkiller
Senior Member
Posts: 725
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

Re: [HL2:DM] Webshortcut

Postby Painkiller » Sat Jan 07, 2017 6:16 am

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

Return to “Plugin Requests”

Who is online

Users browsing this forum: No registered users and 15 guests