Raised This Month: $51 Target: $400
 12% 

Advanced Rules Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Azelphur
AlliedModders Donor
Join Date: Jun 2010
Old 06-08-2011 , 13:03   Re: Advanced Rules Menu
Reply With Quote #51

Quote:
Originally Posted by Dave_h1234 View Post
Help please!!

We would like to use this plugin as its perfect for what we want, However
we already have a rules plugin and thats not what we want it for instead we would like to use it as a menu for a games list. Therefore we need to change the trigger for the menu from "/rules" to something like "/games or "!games".

I'm not really sure how to decompile and change this so any advice is very welcome, thanks

Dave
There is no need for decompilation. All plugins are open source. The .sp file is plain text, and can be edited.
__________________
Azelphur is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 06-08-2011 , 13:33   Re: Advanced Rules Menu
Reply With Quote #52

Quote:
Originally Posted by Dave_h1234 View Post
Help please!!

We would like to use this plugin as its perfect for what we want, However
we already have a rules plugin and thats not what we want it for instead we would like to use it as a menu for a games list. Therefore we need to change the trigger for the menu from "/rules" to something like "/games or "!games".

I'm not really sure how to decompile and change this so any advice is very welcome, thanks

Dave
SourceMod plugins posted here on AlliedModders have their source code uploaded. For most, you can find the trigger by looking for the words RegConsoleCmd and the first text in quotes following it.

If you're looking to change *this* plugin, rather than the other one, go back to the first post, click Get Source, look for
Code:
RegConsoleCmd("sm_rules", RulesMenu_Func);
and change it to
Code:
RegConsoleCmd("sm_games", RulesMenu_Func);
and then use the web compiler on the SourceMod site to recompile it.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Alissa
New Member
Join Date: Jan 2011
Old 06-09-2011 , 16:06   Re: Advanced Rules Menu
Reply With Quote #53

Quote:
Originally Posted by mabo666 View Post
Hey i got a problem, i added rules, etc. but when i am in game it only show 3 lines of the rules... how do i make it show all the text not just some of it...

I am having the same issue as well....
Alissa is offline
CenT
Senior Member
Join Date: Aug 2009
Location: FRANCE
Old 06-15-2011 , 04:11   Re: Advanced Rules Menu
Reply With Quote #54

Hello, I'm looking for a plugin that handles the rules as proposed in the form of menus, but it lacks support multilanguge rules, ie on my server population is international and I would like that the rules be understood by all. Es it possible to add multilanguage support rules?

Thank you for your understanding

~Sorry for my English~
CenT is offline
iocash
New Member
Join Date: Nov 2011
Old 11-08-2011 , 23:53   Re: Advanced Rules Menu
Reply With Quote #55

There is a typo that causes the 1st rule to be skipped in showrules, I have used Azelphur's source, but from what I saw it is the same in the original from neo_gis.

In ShowRulesHandler the line

Code:
CreateRulesMenu(client, 1, MENU_TIME_FOREVER);
Should be

Code:
CreateRulesMenu(client, 0, MENU_TIME_FOREVER);
If you want to keep the choice of displaying the rules at connect or not in Azelphur's source you need to check on the cvar

Code:
public Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    if (!GetConVarInt(g_CvarShowOnConnect))
    {
        new userid = GetEventInt(event, "userid");
        new client = GetClientOfUserId(userid);
        if (ShownRules[client] != userid && GetClientTeam(client) != 0)
        {
            ShownRules[client] = userid;
            CreateRulesMenu(client, 0, 10);
        }
    }
    return Plugin_Continue;
}
And thanks for the plugin

Last edited by iocash; 11-09-2011 at 17:37.
iocash is offline
GrO
Veteran Member
Join Date: Jun 2010
Location: Poland
Old 11-12-2011 , 13:12   Re: Advanced Rules Menu
Reply With Quote #56

Quote:
Originally Posted by iocash View Post
There is a typo that causes the 1st rule to be skipped in showrules, I have used Azelphur's source, but from what I saw it is the same in the original from neo_gis.

In ShowRulesHandler the line

Code:
CreateRulesMenu(client, 1, MENU_TIME_FOREVER);
Should be

Code:
CreateRulesMenu(client, 0, MENU_TIME_FOREVER);
If you want to keep the choice of displaying the rules at connect or not in Azelphur's source you need to check on the cvar

Code:
public Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    if (!GetConVarInt(g_CvarShowOnConnect))
   {
        new userid = GetEventInt(event, "userid");
        new client = GetClientOfUserId(userid);
        if (ShownRules[client] != userid && GetClientTeam(client) != 0)
        {
            ShownRules[client] = userid;
            CreateRulesMenu(client, 0, 10);
        }
   }
    return Plugin_Continue;
}
And thanks for the plugin
Works great, thanks.
GrO is offline
bananapie62
Member
Join Date: Oct 2011
Old 11-16-2011 , 06:43   Re: Advanced Rules Menu
Reply With Quote #57

hey do you think you can have it so the people need to accept the terms and conditions or be kicked, i tried another plugin for that and it cut off most of it.
bananapie62 is offline
dbmiller5
Senior Member
Join Date: Jun 2011
Old 11-21-2011 , 18:11   Re: Advanced Rules Menu
Reply With Quote #58

Hello,

Is there a way to make the menu stay up forever until the user presses 0?
dbmiller5 is offline
iocash
New Member
Join Date: Nov 2011
Old 12-02-2011 , 19:23   Re: Advanced Rules Menu
Reply With Quote #59

Quote:
Originally Posted by dbmiller5 View Post
Hello,

Is there a way to make the menu stay up forever until the user presses 0?
I have attached my version if it helps.

I added a variable for the timeout of the initial showing of the rules:
sm_rules_onconnect_timeout - default 10 - Timeout delay in seconds, set to 0 If you don't want the menu to timeout on players connection.

Also FWI, I have changed the original variable from noconnect to onconnect, it made more sens to me.
sm_rules_onconnect - default 1 - Set to 0 If you don't want menu to show on players connection.
Attached Files
File Type: sp Get Plugin or Get Source (rules.sp - 326 views - 8.2 KB)
iocash is offline
Horsedick
AlliedModders Donor
Join Date: Sep 2011
Old 12-02-2011 , 23:57   Re: Advanced Rules Menu
Reply With Quote #60

Quote:
Originally Posted by dbmiller5 View Post
Hello,

Is there a way to make the menu stay up forever until the user presses 0?

use this one ..gives you two options and a list of all the rules on joining the server - works really good.

http://forums.alliedmods.net/showthread.php?t=72788
Horsedick 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 07:20.


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