Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2014
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.87 KB | None | 0 0
  1. Group/Website Inviter v1.0
  2.  
  3.  
  4.  
  5. -Description-
  6.  
  7. 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.
  8.  
  9.  
  10. -Cvars-
  11.  
  12. Code:
  13. gi_enable 1 - // This Cvar is for all the plugin to enable or disable it || 1 Enable || 0 Disable
  14. gi_webmessage 1 - // Displays Message For Website On Connect || 1 Enable || 0 Disable
  15. -Commands-
  16.  
  17. Code:
  18. /join - Opens the Group Inviter Menu & Asks again if he wants to join the group or not.
  19. ( At the connect of the player, it will ask him if he wants to join or not if he press 'No'
  20. well in chat it will tell him if he changes his mind....type /join. That's why there's this command. )
  21. /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.
  22.  
  23. /website - Opens the website menu.
  24. /web - Opens the website menu.
  25. /forum - Opens the website menu.
  26. -Installation-
  27.  
  28. Put the .amxx in cstrike/addons/amxmodx/plugins
  29. -Then in cstrike/addons/amxmodx/configs/plugins.ini
  30. You will type:
  31. PHP Code:
  32. ; Custom - Add 3rd party plugins here.
  33.  
  34. GroupInviter.amxx
  35. Then put the 2 .txt files in cstrike/addons.
  36.  
  37. After you put the .txt files, make sure that you added the .html files
  38. in the website or fastdl FileZila.
  39.  
  40. -Requirements-
  41.  
  42. PHP Code:
  43. #include < amxmodx >
  44. #include < amxmisc >
  45. #include < cstrike >
  46. #include < nvault >
  47. You can use the defines as the chats. If not ( else ) colorchat. ( Can someone please type me a good english sentance lol c: )
  48. PHP Code:
  49. #if AMXX_VERSION_NUM >= 183
  50. #define ColorChat client_print_color
  51. #define GREEN print_team_default
  52. #define RED print_team_grey
  53. #define BLUE print_team_red
  54. #define GREY print_team_blue
  55. #else
  56. #include < colorchat >
  57. #endif
  58. -Notes-
  59.  
  60. Coding/Sma Part:
  61. You need to change some parts of the code, don't worry it's simple.
  62. Those changes is basically to let the player go to the website.
  63. What you just need to do is replace 'yourwebsitelink' by your
  64. website link/url to each specified part of the code.
  65.  
  66. Here:
  67. PHP Code:
  68. public Website_Handler( id, menu, item ) // dont care about this
  69. { // dont care about this
  70. if( is_user_connected ( id ) ) // dont care about this
  71. { // dont care about this
  72. new szName[ 32 ]; // dont care about this
  73. get_user_name( id, szName, charsmax( szName ) ) // dont care about this
  74. switch( item ) // dont care about this
  75. {
  76. case 0:
  77. {
  78. ColorChat( 0, GREEN, "^x04[GI]^x01 ^x03%s^x01 has just registered on our forums.", szName ) // dont care about this
  79. show_motd( id, "http://yourwebsitelink.com/index.php?action=register", "Register Today!" ) // Here
  80. }
  81. case 1:
  82. {
  83. show_motd( id, "http://yourwebsitelink.com/index.php?action=login", "Welcome To Our Community!" ) // Here
  84. }
  85. case 2:
  86. {
  87. show_motd( id, "http://yourwebsitelink.com/index.php", "Welcome Guest!" ) // Here
  88. }
  89. }
  90. }
  91.  
  92. return PLUGIN_HANDLED; // dont care about this
  93. }
  94. .txt Files Part:
  95. Second of all, make sure that in each .txt file you have the right
  96. direction for the 2 .html files.
  97.  
  98. In the groupjoin.txt file you will see this:
  99. PHP Code:
  100. <html>
  101. <body bgcolor=#dbdbdb>
  102. <br>
  103. <center>
  104. <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  105. <tr>
  106. <td><div align="center"><font size="1" face="trebuchet ms">Loading ...
  107. </font></div></td>
  108. </tr>
  109. </table>
  110. </center>
  111. <meta http-equiv="Refresh" content="0; URL=http://yourwebsitelinkhereorfastdllink.com/motdjoin.html">
  112. </body>
  113. </html>
  114. And in the groupleave.txt file you will see this:
  115. PHP Code:
  116. <html>
  117. <body bgcolor=#dbdbdb>
  118. <br>
  119. <center>
  120. <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  121. <tr>
  122. <td><div align="center"><font size="1" face="trebuchet ms">Loading ...
  123. </font></div></td>
  124. </tr>
  125. </table>
  126. </center>
  127. <meta http-equiv="Refresh" content="0; URL=http://yourwebsitelinkhereorfastdllink.com/motdleave.html">
  128. </body>
  129. </html>
  130. Now where it says 'yourwebsitelinkhereorfastdllink' that means it's
  131. the direction where you have putting the .html files. Each .txt
  132. file have a .html file as you have noticed up there
  133. ( groupjoin.txt = motdjoin.html & groupleave.txt = motdleave.html ).
  134.  
  135. .html Files Part:
  136. Each .html file have certainly something in it, and that thing will
  137. lead us to the steam group. In each of the .html files you need
  138. to change a little part so it will lead the players to your steam
  139. group. Here are the parts you need to change.
  140.  
  141. In the motdjoin.html you got:
  142. PHP Code:
  143. <html>
  144. <body bgcolor=#dbdbdb>
  145. <div style="text-align: center;">
  146. <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;">
  147. <div style="font-size: 30px; font-family: impact; width: 100%; margin-bottom: 5px;">Group/Website Inviter</div>
  148. Made by Baws</a>.
  149. <dl>
  150. <dt>1. <b>When you will click 'Join Group' you will be redirected to the group.</b></dt>
  151. <dt>2. <b>Scroll down & Click on 'Join Group'.</b></dt>
  152. <dt>3. <b>Now login with your steam username & password.</b></dt>
  153. <dt>- <b>[</b> <i>Maybe you will have to verify your code. If so, press 'ALT & TAB'. </dt>
  154. <dt>Then go to your Email to see the code.</i> <b>]</b></dt>
  155. <dt>4. <b>After the login, you will be redirected to the group.</b></dt>
  156. <dt>5. <b>In conclusion, click on the 'Join Group' and you're in!</b></dt>
  157. <dt>6. <b>Thank you & Have Fun In Game!</b></dt>
  158. <p>
  159. <a href="your steam group url/link in here c:">
  160. <img src="http://i.imgur.com/9w5xD3X.jpg" alt="" width="160" height="40"></a></p>
  161. </dl>
  162. </div>
  163. </div>
  164.  
  165. </body>
  166. </html>
  167. Where it says 'your steam group url/link in here c:'
  168. it means you need to add your steam group url or
  169. link in there. For example:
  170. Instead of this 'your steam group url/link in here c:'
  171. you will add this:
  172. 'http://steamcommunity.com/groups/AlliedGamersCommunity'.
  173.  
  174. That's for sure that you don't need to remove the
  175. quotes from the original code from the html. But
  176. you need to remove those ' '.
  177.  
  178. Here is you got in the motdleave.html file:
  179. PHP Code:
  180. <html>
  181. <body bgcolor=#dbdbdb>
  182. <div style="text-align: center;">
  183. <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;">
  184. <div style="font-size: 30px; font-family: impact; width: 100%; margin-bottom: 5px;">Group/Website Inviter</div>
  185. Made by Baws</a>.
  186. <dl>
  187. <dt>1. <b>When you will click 'Leave Group' you will be redirected to the group.</b></dt>
  188. <dt>2. <b>Scroll down & Click on 'Leave group'.</b></dt>
  189. <dt>3. <b>Now login with your steam username & password.</b></dt>
  190. <dt>- <b>[</b> <i>Maybe you will have to verify your code. If so, press 'ALT & TAB'. </dt>
  191. <dt>Then go to your Email to see the code.</i> <b>]</b></dt>
  192. <dt>4. <b>After the login, you will be redirected to the group.</b></dt>
  193. <dt>5. <b>In conclusion, click on the 'Leave Group' and you're out!</b></dt>
  194. <dt>6. <b>Good luck in the future!</b></dt>
  195. <p>
  196. <a href="your steam group url/link in here c:">
  197. <img src="http://i.imgur.com/Qyeix1Q.jpg" alt="" width="160" height="40"></a></p>
  198. </dl>
  199. </div>
  200. </div>
  201.  
  202. </body>
  203. </html>
  204. It's basically the same steps as the motdjoin.html file changes.
  205. Just different instructions for the players to follow.
  206.  
  207. -Credits-
  208. Allied-Gamers people for testing the plugin.
  209. ConnorMcLeod & Blizzard_87 helping with nvault.
  210.  
  211. Servers using this plugin!
  212.  
  213. -ChangeLog-
  214.  
  215. Code:
  216. v1.0
  217. * Released.
  218.  
  219. -Thank you, Baws.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement