AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   rules plugin (https://forums.alliedmods.net/showthread.php?t=127060)

kronos321 05-16-2010 13:05

rules plugin
 
not sure if this is already a thread or anything if it is please provide a link to it
or if this is in the wrong section just move it

anyways idk how to make a rules plugin where u type /rules or rules and it opens up a window like the motd window and u can read the rules
i tried public_rules but i didnt want it cuz it shows them in the upper left in yellow text and thats not what i would like it to be

wrecked_ 05-16-2010 13:10

Re: rules plugin
 
Replace yourfile.txt with the file name in your server's cstrike directory. It must be in quotes.

Code:
#include <amxmodx> new const filename[] = "yourfile.txt" public plugin_init() {     register_plugin( "MOTD Rules", "1.0", "Wrecked" )         register_clcmd( "say /rules", "CmdRules" )     register_clcmd( "say_team /rules", "CmdRules" ) } public CmdRules( id ) {     show_motd( id, filename, "Rules" ) }

kronos321 05-16-2010 14:12

Re: rules plugin
 
thank you wrecked

and i would have to convert this to .amxx right??

KadiR 05-16-2010 14:20

Re: rules plugin
 
Yes, here for example:

http://www.amxmodx.org/webcompiler.cgi

kronos321 05-16-2010 14:30

Re: rules plugin
 
thats what i use :D

Kryzu 05-16-2010 14:41

Re: rules plugin
 
http://forums.alliedmods.net/showthread.php?p=1116279

kronos321 05-17-2010 18:47

Re: rules plugin
 
now i got another problem... the rules get cut off is there any way to make it so players can scroll down to see the rest or what???

JaGareN 05-17-2010 18:52

Re: rules plugin
 
Show what you have use in your motd.

kronos321 05-17-2010 19:09

Re: rules plugin
 
this was made in dreamweaver just to make it simple for me but it cut off at like 30,000 i think it was and i couldnt view what was below it
and if ur wondering why its xp its for my friend's pokemod server



Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
    background-color: #000;
}
body,td,th {
    color: #F00;
    font-size: x-large;
}
-->
</style></head>

<body>
<center>
  <p>Buying experience </p>
  <table width="200" border="1">
    <tr>
      <td>1,000 xp</td>
      <td>1 mill</td>
    </tr>
    <tr>
      <td>2,000 xp</td>
      <td>2 mill</td>
    </tr>
    <tr>
      <td>3,000 xp</td>
      <td>3 mill</td>
    </tr>
    <tr>
      <td>4,000 xp</td>
      <td>4 mill</td>
    </tr>
    <tr>
      <td>5,000 xp</td>
      <td>5 mill</td>
    </tr>
    <tr>
      <td>10,000 xp</td>
      <td>10 mill</td>
    </tr>
    <tr>
      <td>15,000 xp</td>
      <td>15 mill</td>
    </tr>
    <tr>
      <td>20,000 xp</td>
      <td>20 mill</td>
    </tr>
    <tr>
      <td>25,000 xp</td>
      <td>25 mill</td>
    </tr>
    <tr>
      <td>30,000 xp</td>
      <td>30 mill</td>
    </tr>
    <tr>
      <td>35,000 xp</td>
      <td>35 mill</td>
    </tr>
    <tr>
      <td>37,000 xp</td>
      <td>37 mill</td>
    </tr>
  </table>
  <p>Normal = 1 mill</p>
  <p>Rare = 15 mill</p>
  <p>Legendary = 50 mill<br />
  </p>
  <p>&nbsp;</p>
</center>
</body>
</html>


fysiks 05-17-2010 19:38

Re: rules plugin
 
Don't use code from Dreamweaver directly, it needs modified before it can be used successfully.

HTML Code:

<html><head>
<style type="text/css">
body {
    background-color: #000;
}
body,td,th {
    color: #F00;
    font-size: x-large;
}
</style></head>

<body>
<center>
<p>Buying experience </p>
<table width="200" border="1">
<tr><td>1,000 xp</td><td>1 mill</td></tr>
<tr><td>2,000 xp</td><td>2 mill</td></tr>
<tr><td>3,000 xp</td><td>3 mill</td></tr>
<tr><td>4,000 xp</td><td>4 mill</td></tr>
<tr><td>5,000 xp</td><td>5 mill</td></tr>
<tr><td>10,000 xp</td><td>10 mill</td></tr>
<tr><td>15,000 xp</td><td>15 mill</td></tr>
<tr><td>20,000 xp</td><td>20 mill</td></tr>
<tr><td>25,000 xp</td><td>25 mill</td></tr>
<tr><td>30,000 xp</td><td>30 mill</td></tr>
<tr><td>35,000 xp</td><td>35 mill</td></tr>
<tr><td>37,000 xp</td><td>37 mill</td></tr>
</table>
<p>Normal = 1 mill</p>
<p>Rare = 15 mill</p>
<p>Legendary = 50 mill<br /></p>
</center>
</body>
</html>

Removed 535 useless characters :).


All times are GMT -4. The time now is 03:37.

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