Welcome to TangoWorldWide!
You are a Guest, which means you cannot use
all possible features on this forum.
Sign in or Register, to enjoy full functionality. It'll only take 2 seconds!
417 Players in 13 Servers

Author Topic: [CS:GO] Return of !rules and !frules  (Read 486 times)

0 Members and 1 Guest are viewing this topic.

Online jordan

  • LolZ
  • Technologies Director
  • Forum Addict
  • *
  • *
  • *
  • *
  • Topic Author
  • Posts: 1525
  • U.S. Army
    • http://steamcommunity.com/id/jallard/
    • https://www.twitch.tv/lolztv12
    • https://twitter.com/JordanAllard18
    • View Profile
  • Liked: 284
  • Likes Given: 270
  • User Avatar

    T.w² | jrdn

    Online


  • Total Badges: 35
    Badges: (View All)
    Thanksgiving 2019 Wheezer Halloween 2019 3 Year Coin Summer 2018 Croc-a-dil 12 Days of Christmas 2017 2 Year Coin Christmas 2017 Halloween 2017 Staff of the Month 2017 Fly Shit Only Summer 2017 Bacon! Badge Collector (20) 12 Days of Christmas 2016 1000 Posts Gstad's Squad Invisible Badge Collector (15) 100 Poll Votes Black-Star 1 Year Coin Christmas 2016 Badge Collector (10) Thanksgiving 2016 500 Posts Spammer-50 Spammer-25 Badge Collector (5) Halloween 2016 100 Posts Quick Poster Summer 2016 Mobile User
[CS:GO] Return of !rules and !frules
« on: November 30, 2019, 08:30:19 am »
This was a huge fucking pain in the ass.
  • !rules and !frules have returned.
  • Choose section to view.
  • !frules menu cannot be closed until player reaches a confirmation option.
  • Plugin pulls MOTD data from the website.

!rules
This command is available to everyone. The plugin displays a menu with the different rule sections. Players can choose to view individual sections or all rules.
Spoiler: Screenshots (click to show/hide)

When a section is chosen, it will display the section name at the top, and the rules which fall under the section below, and across multiple pages if necessary.
Spoiler: Screenshot (click to show/hide)

The all rules display will highlight the next section name orange, regardless of where it appears in the menu.
Spoiler: Screenshot (click to show/hide)

The command for this functionality is described below:
Code: [Select]
sm_rules - View the server rules.
I realize that the current method of displays the rules and implementing pagination is ugly. This will be addressed in a (near) future update when I switch from using Menus to Panels (low-level Menus).
When this update is released, rules will also be numbered in the same way as they are in the MOTDs. In this update, the plugin will also not end lines in the middle of words, instead waiting for a space (" ") to occur before ending the line.

!frules
This plugin is available to admins with the 'b' flag (ADMFLAG_GENERIC). The plugin displays a menu with the different rule sections. The admin will choose what section they would like to force the offending player to read.
They can also choose to make the player read all rules; however, it is recommended that a player only be forced to read rules from the section corresponding to the rule they broke.
The !frules section select menu appears in the same way as the !rules menu.
Spoiler: Screenshot (click to show/hide)

Once a section is chosen, a menu will open on the offending player's screen, displaying the rules from the section selected.
The player cannot close out of this menu until they have *read* through all pages, and have reached the 'Finish' option.
Admins are notified that you forced a player to read x section. The offending player is notified that they were forced to view x section and they must reach the end of the menu before exiting. Other players are notified that the offending player was forced to read x section.
Spoiler: Screenshots (click to show/hide)

The command for this functionality is described below. Multiple players cannot be targeted.
Code: [Select]
sm_frules <username/#id> - Forces a player to view the server rules.
Plugin Pulls From MOTD Data
The plugin sends a GET request to the website specified in 'motd.txt'. Because of this, the plugin relies on an extension called SteamWorks, which implements cURL functionality into SourcePawn.
After receiving the data, the plugin finds where the rules begin, separates each rule, strips away the HTML, and caches the sections and rules. This happens each time the map changes.

If you would like to see the data the plugin receives, you can go here, right click, and select 'View Page Source.'

Every time the MOTD is updated, the rules in the server are also updated (after the map changes).

Making the plugin work in this way was an absolute cancer.
Thank you to @Caribou and @lulu for helping me test.

Feel free to contact me if you have any questions, suggestions, or concerns. If something in the menu doesn't look right, take a screenshot and message me.

Edit: @CmAnT please have your Divisional Staff make their admins aware of this new functionality.

Best Regards
Jordan - Technologies Director
« Last Edit: November 30, 2019, 08:32:58 am by jordan »
"We the people face unconstitutional lies. In greed we trust, in revolution we die."
my son is fat
This is lolz. He never withdraws he just goes until he loses everything.

Offline Caribou

  • Dollar days
  • Divisional Staff
  • Forum Addict
  • *
  • *
  • *
  • *
  • *
  • Posts: 1175
  • Living a divine comedy
    • https://steamcommunity.com/id/thenownow
    • https://twitter.com/ulvlup
    • View Profile
  • Liked: 162
  • Likes Given: 153
  • User Avatar

    T.w² | Caribou

    Online


  • Total Badges: 27
    Badges: (View All)
    Black-Star Thanksgiving 2019 Graphic Master Wheezer Halloween 2019 3 Year Coin Badge Collector (20) 1000 Posts Certified Cutie 2 Year Coin Badge Collector (15) Christmas 2017 Halloween 2017 Summer 2017 1 Year Coin 12 Days of Christmas 2016 Badge Collector (10) 100 Poll Votes 500 Posts Christmas 2016 Spammer-25 Badge Collector (5) Halloween 2016 100 Posts Quick Poster Summer 2016 Mobile User
Re: [CS:GO] Return of !rules and !frules
« Reply #1 on: November 30, 2019, 08:47:32 am »
My hero...
Rule breakers will be no more as us admins will chain them to a rock and force them to eat the rules like cold porridge. The dark age of the servers will be no more...

Good shit, though.
This will genuinely help admins a butt load.
 𝓒𝐚𝐫𝐢𝐛𝐨𝐮 ✲          
/₁₉ ₊ 🇬🇲🇹 ₊ 「ヨーダ」◦     𝘵𝘪𝘮𝘦 𝘧𝘰𝘳 𝘢 𝘵𝘦𝘮𝘱𝘰 𝘤𝘩𝘢𝘯𝘨𝘦



ok liberal

Offline Dr.Brandon8506

  • Sr. Staff
  • Forum Junkie
  • *
  • *
  • Posts: 658
  • 2011 BMW E92 M3
    • http://steamcommunity.com/profiles/76561198137074618/
    • https://www.youtube.com/user/anibad969/videos
    • View Profile
  • Liked: 45
  • Likes Given: 170
  • User Avatar

    T.w² | Dr.Brandon8506

    Online


  • Total Badges: 23
    Badges: (View All)
    Thanksgiving 2019 4 Year Coin Badge Collector (20) 3 Year Coin 500 Posts Christmas 2017 Halloween 2017 Badge Collector (15) Summer 2017 2 Year Coin Christmas 2016 Halloween 2016 Badge Collector (10) Summer 2016 Spammer-25 Mobile User 1 Year Coin Badge Collector (5) Christmas 2015 Thanksgiving 2015 100 Posts Halloween 2015 Quick Poster
Re: [CS:GO] Return of !rules and !frules
« Reply #2 on: November 30, 2019, 11:55:00 am »
Bless you soul!!!!!!!!!!!!! Its about time we have this!!!!
Former Jailbreak Supplementary Admin
Former Junior Staff
Former Community Event Coordinator
Former Div Staff of CSGO Zombie Escape
Former Community Leader (4 times)
Former Member (3 times)


11. If you could change one thing about Tango what would it be?: Jailbreak.
@Dr.Brandon8506 Thanks for all the memories on jailbreak. It was always so fun playing with you. I hope you remember all the good times like I do.


Offline itsProject

  • Divisional Staff
  • Forum Addict
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • Posts: 3073
  • 𝐩𝐞𝐞𝐤𝐚𝐛𝐨𝐨
    • http://steamcommunity.com/id/brandonheartyou/
    • View Profile
  • Liked: 225
  • Likes Given: 174
  • User Avatar

    tw project

    Offline


  • Total Badges: 26
    Badges: (View All)
    Thanksgiving 2019 Halloween 2019 3 Year Coin 2500 Posts 2 Year Coin Badge Collector (20) 12 Days of Christmas 2017 Christmas 2017 Halloween 2017 Summer 2017 Badge Collector (15) 1 Year Coin 100 Poll Votes 12 Days of Christmas 2016 1000 Posts Badge Collector (10) Christmas 2016 500 Posts Thanksgiving 2016 Spammer-50 Badge Collector (5) 100 Posts Spammer-25 Quick Poster Mobile User Halloween 2016
Re: [CS:GO] Return of !rules and !frules
« Reply #3 on: November 30, 2019, 12:31:50 pm »
My savior...
Rule breakers will be no more as us admins will chain them to a rock and force them to eat the rules like cold porridge. The dark age of the servers will be no more...

anime enthusiast also loli lover
myanimelist | steam | ♥️ | twitter

Offline oscar

  • High Valor of the Three Secret Cities
  • Closed
  • Forum Addict
  • *
  • Posts: 2509
    • View Profile
  • Liked: 58
  • Likes Given: 17
  • User Avatar

    oscar

    Offline


  • Total Badges: 32
    Badges: (View All)
    5 Year Coin 4 Year Coin 2500 Posts Christmas 2017 Halloween 2017 3 Year Coin Summer 2017 Overruled - Rez's Badge 100 Poll Votes Christmas 2016 Halloween 2016 Badge Collector (20) 2 Year Coin Summer 2016 Black-Star Invisible Badge Collector (15) aPn's Award 12 Days of Christmas Spammer-50 Christmas 2015 Badge Collector (10) Thanksgiving 2015 Halloween 2015 1 Year Coin 1000 Posts Badge Collector (5) Spammer-25 Quick Poster Mobile User 500 Posts 100 Posts
Re: [CS:GO] Return of !rules and !frules
« Reply #4 on: December 01, 2019, 06:54:23 am »
Nice work!

As an alternative you are able to stick most of the text in the Title, and use `\n` which would eliminate the `ITEMDRAW_DISABLED` you used for the rules. This would provide a cleaner solution, and be able to use Menu's ( 7, 8 ) as intended to scroll through the rules if they break char limit.

I hope your pain in the ass has been resolved :^)

Offline balon

  • Operations Director
  • 5k Poster
  • *
  • *
  • *
  • Posts: 7066
    • http://steamcommunity.com/id/balon21
    • http://www.twitch.tv/balonfx
    • https://twitter.com/TangoWorldWide
    • View Profile
  • Liked: 1563
  • Likes Given: 295
  • User Avatar

    T.w² | balon

    Online


  • Total Badges: 47
    Badges: (View All)
    Thanksgiving 2019 Halloween 2019 rich boi 5 Year Coin Coby Wizowd Summer 2018 Croc-a-dil 4 Year Coin 12 Days of Christmas 2017 Christmas 2017 Halloween 2017 Roasting Event 2017 Summer 2017 Gstad's Squad Blackhat Fly Shit Only 3 Year Coin Christmas 2016 5000 Posts Thanksgiving 2016 Mobz Award Halloween 2016 The Rich Bitch Summer 2016 Drunk Award 12 Days of Christmas Badge Collector (20) 2 Year Coin aPn's Award Christmas 2015 Spammer-25 Badge Collector (15) Thanksgiving 2015 Halloween 2015 Quick Collector (10) Badge Collector (10) Invisible Quick Poster Mobile User Quick Collector (5) 100 Poll Votes Badge Collector (5) 2500 Posts 1000 Posts 500 Posts 100 Posts 1 Year Coin
Re: [CS:GO] Return of !rules and !frules
« Reply #5 on: December 01, 2019, 02:53:35 pm »
Nice approach to solve a cancerous restriction by valve!


Offline Cyka Blyat [Weeaboo]

  • Voice Actor
  • Junior Member
  • Forum Regular
  • *
  • *
  • Posts: 159
  • Working for A-1 Pictures
    • http://steamcommunity.com/id/CykaBlyatChina/
    • View Profile
  • Liked: 11
  • Likes Given: 15
  • User Avatar

    T.w² / Cyka Blyat [Weaboo]

    Offline


  • Total Badges: 8
    Badges: (View All)
    100 Posts 2 Year Coin Badge Collector (5) 1 Year Coin Christmas 2017 Halloween 2017 Summer 2017 Mobile User
Re: [CS:GO] Return of !rules and !frules
« Reply #6 on: December 02, 2019, 08:33:23 pm »
Why did we remove !frules, wasn't it working fine beefore?
Fucking Magical

Online jordan

  • LolZ
  • Technologies Director
  • Forum Addict
  • *
  • *
  • *
  • *
  • Topic Author
  • Posts: 1525
  • U.S. Army
    • http://steamcommunity.com/id/jallard/
    • https://www.twitch.tv/lolztv12
    • https://twitter.com/JordanAllard18
    • View Profile
  • Liked: 284
  • Likes Given: 270
  • User Avatar

    T.w² | jrdn

    Online


  • Total Badges: 35
    Badges: (View All)
    Thanksgiving 2019 Wheezer Halloween 2019 3 Year Coin Summer 2018 Croc-a-dil 12 Days of Christmas 2017 2 Year Coin Christmas 2017 Halloween 2017 Staff of the Month 2017 Fly Shit Only Summer 2017 Bacon! Badge Collector (20) 12 Days of Christmas 2016 1000 Posts Gstad's Squad Invisible Badge Collector (15) 100 Poll Votes Black-Star 1 Year Coin Christmas 2016 Badge Collector (10) Thanksgiving 2016 500 Posts Spammer-50 Spammer-25 Badge Collector (5) Halloween 2016 100 Posts Quick Poster Summer 2016 Mobile User
Re: [CS:GO] Return of !rules and !frules
« Reply #7 on: December 02, 2019, 09:01:01 pm »
Why did we remove !frules, wasn't it working fine beefore?
The panorama update disabled MOTD windows.
"We the people face unconstitutional lies. In greed we trust, in revolution we die."
my son is fat
This is lolz. He never withdraws he just goes until he loses everything.

Online [Xtra]

  • Memento Mori
  • Junior Member
  • Forum Regular
  • *
  • *
  • *
  • Posts: 326
  • Chillin
    • https://steamcommunity.com/profiles/76561198179541179/
    • View Profile
  • Liked: 40
  • Likes Given: 179
  • User Avatar

    T.w² | [Xtra]

    Online


  • Total Badges: 6
    Badges: (View All)
    Badge Collector (5) Thanksgiving 2019 100 Posts Halloween 2019 Quick Poster Mobile User
Re: [CS:GO] Return of !rules and !frules
« Reply #8 on: December 02, 2019, 09:11:49 pm »
Nice this is great this will be a big help to me and other admins thanks and well done jordan


Current Position Jailbreak SA

Offline Cyka Blyat [Weeaboo]

  • Voice Actor
  • Junior Member
  • Forum Regular
  • *
  • *
  • Posts: 159
  • Working for A-1 Pictures
    • http://steamcommunity.com/id/CykaBlyatChina/
    • View Profile
  • Liked: 11
  • Likes Given: 15
  • User Avatar

    T.w² / Cyka Blyat [Weaboo]

    Offline


  • Total Badges: 8
    Badges: (View All)
    100 Posts 2 Year Coin Badge Collector (5) 1 Year Coin Christmas 2017 Halloween 2017 Summer 2017 Mobile User
Re: [CS:GO] Return of !rules and !frules
« Reply #9 on: December 03, 2019, 12:40:52 am »
How to abuse !frules 101
Fucking Magical

 

G2A Sponsor Image
DigitalOcean
Sinus Bot
AllTrapNation.com
OVH Networks
G2A Sponsor Image
DigitalOcean
Sinus Bot
AllTrapNation.com
OVH Networks