Raised This Month: $32 Target: $400
 8% 

[ANY] BETA Advanced Rules Menu


Post New Thread Reply   
 
Thread Tools Display Modes
ocean6
Junior Member
Join Date: Mar 2019
Old 04-05-2020 , 23:43   Re: [ANY] BETA Advanced Rules Menu
Reply With Quote #31

I'm confused on a few things...

Which .cfg does the advanced_rules_force_show 1 need to go into so it sets the variable we want by default?

How does the server know who has accepted and who hasn't? Does that data store in a file somewhere?
ocean6 is offline
azalty
AlliedModders Donor
Join Date: Feb 2020
Location: France
Old 04-06-2020 , 06:49   Re: [ANY] BETA Advanced Rules Menu
Reply With Quote #32

Quote:
Originally Posted by ocean6 View Post
I'm confused on a few things...

Which .cfg does the advanced_rules_force_show 1 need to go into so it sets the variable we want by default?

How does the server know who has accepted and who hasn't? Does that data store in a file somewhere?
There is no .cfg file for this, just write:
sm_cvar advanced_rules_force_show 1
in your server.cfg

and it seems to use SetClientCookie to store the last accept unix time
else, your rules are in configs/Rules.cfg

Last edited by azalty; 04-06-2020 at 06:49.
azalty is offline
shortiee
New Member
Join Date: Dec 2020
Old 12-26-2020 , 08:19   Re: [ANY] BETA Advanced Rules Menu
Reply With Quote #33

My rules disappear in 3 seconds, how can i fix them for long time?

Thanks!
shortiee is offline
OneMore
Senior Member
Join Date: Feb 2019
Old 03-25-2021 , 21:25   Re: [ANY] BETA Advanced Rules Menu
Reply With Quote #34

I've updated the plugin. Changes:
- new syntax;
- you can make long rules (up to about 500 characters), split them into lines with "/n", long rules will have pages.
- added cfg file in /cfg/sourcemod for those who want keeping convars there;
- added translations and made a Russian translation
- minor change of logic: if players see rules at the beginning, they know they should read and accept to avoid this menu; all players informed about a command how to read rules if they need to.

I don't know how to avoid 512 characters restriction in KvGetString. If you know please tell me, I would prefer to have even longer rules

If someone wants to add other translations - welcome!

I didn't check the functionality to modify rules in the plugin because to write your own Rules.cfg is much simpler, but @eyal282 insisted on that functionality, so I left it as is. If you need it, please check and report bags (to eyal282 )
Attached Files
File Type: txt advancedrules.phrases.txt (5.2 KB, 66 views)
File Type: sp Get Plugin or Get Source (AdvancedRules.sp - 141 views - 26.9 KB)

Last edited by OneMore; 03-25-2021 at 21:38.
OneMore is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 03-26-2021 , 15:06   Re: [ANY] BETA Advanced Rules Menu
Reply With Quote #35

Quote:
Originally Posted by OneMore View Post
I've updated the plugin. Changes:
- new syntax;
- you can make long rules (up to about 500 characters), split them into lines with "/n", long rules will have pages.
- added cfg file in /cfg/sourcemod for those who want keeping convars there;
- added translations and made a Russian translation
- minor change of logic: if players see rules at the beginning, they know they should read and accept to avoid this menu; all players informed about a command how to read rules if they need to.

I don't know how to avoid 512 characters restriction in KvGetString. If you know please tell me, I would prefer to have even longer rules

If someone wants to add other translations - welcome!

I didn't check the functionality to modify rules in the plugin because to write your own Rules.cfg is much simpler, but @eyal282 insisted on that functionality, so I left it as is. If you need it, please check and report bags (to eyal282 )
PLEASE tell me that this comes after the update I published on github
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
OneMore
Senior Member
Join Date: Feb 2019
Old 03-26-2021 , 16:53   Re: [ANY] BETA Advanced Rules Menu
Reply With Quote #36

Quote:
Originally Posted by eyal282 View Post
PLEASE tell me that this comes after the update I published on github
I have to disappoint you
OneMore is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 03-26-2021 , 17:11   Re: [ANY] BETA Advanced Rules Menu
Reply With Quote #37

Quote:
Originally Posted by OneMore View Post
I have to disappoint you
Don't worry, just need to compare the files lexographically ( however you spell it ) to combine all features. My changes were critical but a total of 30 lines were changed.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
ZEPHYR C137
Junior Member
Join Date: Sep 2021
Location: Earth C137
Old 09-26-2021 , 10:55   Re: [ANY] BETA Advanced Rules Menu
Reply With Quote #38

is there any way to add a translation file? I have the rules set, but not everyone in the server understand english, i have to add Spanish and russian too. please answer me if you can.
ZEPHYR C137 is offline
OneMore
Senior Member
Join Date: Feb 2019
Old 09-26-2021 , 11:06   Re: [ANY] BETA Advanced Rules Menu
Reply With Quote #39

Quote:
Originally Posted by ZEPHYR C137 View Post
is there any way to add a translation file? I have the rules set, but not everyone in the server understand english, i have to add Spanish and russian too. please answer me if you can.
You can check my version above. It is with a translation file. But you. need to translate to Spanish yourself
OneMore is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 09-26-2021 , 14:50   Re: [ANY] BETA Advanced Rules Menu
Reply With Quote #40

Quote:
Originally Posted by OneMore View Post
You can check my version above. It is with a translation file. But you. need to translate to Spanish yourself
Please add me on discord so I can add you as a collab on github:
Eyal282#1334
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:52.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode