Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Group/Website Inviter v1.0
- -Description-
- This plugin is basically made out of new ideas for some growing communities. Its basically a plugin where it invites people to your steam group threw the server and they can even visit your forums from your own server.
- -Cvars-
- Code:
- gi_enable 1 - // This Cvar is for all the plugin to enable or disable it || 1 Enable || 0 Disable
- gi_webmessage 1 - // Displays Message For Website On Connect || 1 Enable || 0 Disable
- -Commands-
- Code:
- /join - Opens the Group Inviter Menu & Asks again if he wants to join the group or not.
- ( At the connect of the player, it will ask him if he wants to join or not if he press 'No'
- well in chat it will tell him if he changes his mind....type /join. That's why there's this command. )
- /leave - If the player decides to leave the group, he just type this command and he follow the instructions and then he will be out of the group.
- /website - Opens the website menu.
- /web - Opens the website menu.
- /forum - Opens the website menu.
- -Installation-
- Put the .amxx in cstrike/addons/amxmodx/plugins
- -Then in cstrike/addons/amxmodx/configs/plugins.ini
- You will type:
- PHP Code:
- ; Custom - Add 3rd party plugins here.
- GroupInviter.amxx
- Then put the 2 .txt files in cstrike/addons.
- After you put the .txt files, make sure that you added the .html files
- in the website or fastdl FileZila.
- -Requirements-
- PHP Code:
- #include < amxmodx >
- #include < amxmisc >
- #include < cstrike >
- #include < nvault >
- You can use the defines as the chats. If not ( else ) colorchat. ( Can someone please type me a good english sentance lol c: )
- PHP Code:
- #if AMXX_VERSION_NUM >= 183
- #define ColorChat client_print_color
- #define GREEN print_team_default
- #define RED print_team_grey
- #define BLUE print_team_red
- #define GREY print_team_blue
- #else
- #include < colorchat >
- #endif
- -Notes-
- Coding/Sma Part:
- You need to change some parts of the code, don't worry it's simple.
- Those changes is basically to let the player go to the website.
- What you just need to do is replace 'yourwebsitelink' by your
- website link/url to each specified part of the code.
- Here:
- PHP Code:
- public Website_Handler( id, menu, item ) // dont care about this
- { // dont care about this
- if( is_user_connected ( id ) ) // dont care about this
- { // dont care about this
- new szName[ 32 ]; // dont care about this
- get_user_name( id, szName, charsmax( szName ) ) // dont care about this
- switch( item ) // dont care about this
- {
- case 0:
- {
- ColorChat( 0, GREEN, "^x04[GI]^x01 ^x03%s^x01 has just registered on our forums.", szName ) // dont care about this
- show_motd( id, "http://yourwebsitelink.com/index.php?action=register", "Register Today!" ) // Here
- }
- case 1:
- {
- show_motd( id, "http://yourwebsitelink.com/index.php?action=login", "Welcome To Our Community!" ) // Here
- }
- case 2:
- {
- show_motd( id, "http://yourwebsitelink.com/index.php", "Welcome Guest!" ) // Here
- }
- }
- }
- return PLUGIN_HANDLED; // dont care about this
- }
- .txt Files Part:
- Second of all, make sure that in each .txt file you have the right
- direction for the 2 .html files.
- In the groupjoin.txt file you will see this:
- PHP Code:
- <html>
- <body bgcolor=#dbdbdb>
- <br>
- <center>
- <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><div align="center"><font size="1" face="trebuchet ms">Loading ...
- </font></div></td>
- </tr>
- </table>
- </center>
- <meta http-equiv="Refresh" content="0; URL=http://yourwebsitelinkhereorfastdllink.com/motdjoin.html">
- </body>
- </html>
- And in the groupleave.txt file you will see this:
- PHP Code:
- <html>
- <body bgcolor=#dbdbdb>
- <br>
- <center>
- <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><div align="center"><font size="1" face="trebuchet ms">Loading ...
- </font></div></td>
- </tr>
- </table>
- </center>
- <meta http-equiv="Refresh" content="0; URL=http://yourwebsitelinkhereorfastdllink.com/motdleave.html">
- </body>
- </html>
- Now where it says 'yourwebsitelinkhereorfastdllink' that means it's
- the direction where you have putting the .html files. Each .txt
- file have a .html file as you have noticed up there
- ( groupjoin.txt = motdjoin.html & groupleave.txt = motdleave.html ).
- .html Files Part:
- Each .html file have certainly something in it, and that thing will
- lead us to the steam group. In each of the .html files you need
- to change a little part so it will lead the players to your steam
- group. Here are the parts you need to change.
- In the motdjoin.html you got:
- PHP Code:
- <html>
- <body bgcolor=#dbdbdb>
- <div style="text-align: center;">
- <div style="width: 80%; margin: 0px auto; border: 10px solid #c9d6e4; background-color: #ededed; padding: 10px; font-size: 12px; font-family: Tahoma; margin-top: 10px; color: #818181; text-align: left;">
- <div style="font-size: 30px; font-family: impact; width: 100%; margin-bottom: 5px;">Group/Website Inviter</div>
- Made by Baws</a>.
- <dl>
- <dt>1. <b>When you will click 'Join Group' you will be redirected to the group.</b></dt>
- <dt>2. <b>Scroll down & Click on 'Join Group'.</b></dt>
- <dt>3. <b>Now login with your steam username & password.</b></dt>
- <dt>- <b>[</b> <i>Maybe you will have to verify your code. If so, press 'ALT & TAB'. </dt>
- <dt>Then go to your Email to see the code.</i> <b>]</b></dt>
- <dt>4. <b>After the login, you will be redirected to the group.</b></dt>
- <dt>5. <b>In conclusion, click on the 'Join Group' and you're in!</b></dt>
- <dt>6. <b>Thank you & Have Fun In Game!</b></dt>
- <p>
- <a href="your steam group url/link in here c:">
- <img src="http://i.imgur.com/9w5xD3X.jpg" alt="" width="160" height="40"></a></p>
- </dl>
- </div>
- </div>
- </body>
- </html>
- Where it says 'your steam group url/link in here c:'
- it means you need to add your steam group url or
- link in there. For example:
- Instead of this 'your steam group url/link in here c:'
- you will add this:
- 'http://steamcommunity.com/groups/AlliedGamersCommunity'.
- That's for sure that you don't need to remove the
- quotes from the original code from the html. But
- you need to remove those ' '.
- Here is you got in the motdleave.html file:
- PHP Code:
- <html>
- <body bgcolor=#dbdbdb>
- <div style="text-align: center;">
- <div style="width: 80%; margin: 0px auto; border: 10px solid #c9d6e4; background-color: #ededed; padding: 10px; font-size: 12px; font-family: Tahoma; margin-top: 10px; color: #818181; text-align: left;">
- <div style="font-size: 30px; font-family: impact; width: 100%; margin-bottom: 5px;">Group/Website Inviter</div>
- Made by Baws</a>.
- <dl>
- <dt>1. <b>When you will click 'Leave Group' you will be redirected to the group.</b></dt>
- <dt>2. <b>Scroll down & Click on 'Leave group'.</b></dt>
- <dt>3. <b>Now login with your steam username & password.</b></dt>
- <dt>- <b>[</b> <i>Maybe you will have to verify your code. If so, press 'ALT & TAB'. </dt>
- <dt>Then go to your Email to see the code.</i> <b>]</b></dt>
- <dt>4. <b>After the login, you will be redirected to the group.</b></dt>
- <dt>5. <b>In conclusion, click on the 'Leave Group' and you're out!</b></dt>
- <dt>6. <b>Good luck in the future!</b></dt>
- <p>
- <a href="your steam group url/link in here c:">
- <img src="http://i.imgur.com/Qyeix1Q.jpg" alt="" width="160" height="40"></a></p>
- </dl>
- </div>
- </div>
- </body>
- </html>
- It's basically the same steps as the motdjoin.html file changes.
- Just different instructions for the players to follow.
- -Credits-
- Allied-Gamers people for testing the plugin.
- ConnorMcLeod & Blizzard_87 helping with nvault.
- Servers using this plugin!
- -ChangeLog-
- Code:
- v1.0
- * Released.
- -Thank you, Baws.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement