<!-- BEGIN TEMPLATE: postbit_external -->
<div>Hey, I'm a very new coder, and I figured I'd give it a try to create a rules plugin for HideNSeek. I'm lookin g to share my plugin because I think it turned out pretty well, but I'm also looking for feedback to improve my work.<br /><br />Here is the code for my plugin:<br /><br /><br />/* Plugin generated by AMXX-Studio */<br /><br />#include <amxmodx><br />#include <hamsandwich><br />#include <cstrike><br /><br />#define PLUGIN "HideNSeekRules"<br />#define VERSION "3.0"<br />#define AUTHOR "Qvantry"<br /><br />#define PREFIX "Your website here"<br /><br /><br />public plugin_init() {<br /> register_plugin(PLUGIN, VERSION, AUTHOR)<br /> <br /> register_clcmd("say /rules", "RoundStart");<br /> register_concmd("rules", "ShowRulesConsole");<br /> RegisterHam(Ham_Spawn, "player", "CT_PlayerSpawn", 1);<br />}<br /><br />public client_putinserver(id)<br />{<br /> set_task(1.0, "ConnectShowRules", id)<br />}<br /><br />public ConnectShowRules(id)<br />{<br /> new iName[64];<br /> get_user_name(id, iName, 33)<br /> <br /> set_hudmessage(255, 127, 0, 0.055, 0.2, 0, 6.0, 12.0)<br /> show_hudmessage(id, "Hi %s and welcome to %s^nIf you don't follow these rules you will be punished.^n ^n1. Obey the rules!^n2. No hacking!^n3. Spamming and/or yelling!^n4. No advertising!^n5. No funnyjumping(CT)!^n6. No free killing!^n7. No bad disconnecting!^n8. No underblocking!^n9. No understabing!^n10. Hiders are allowed to camp for 60 seconds!^n11. Do NOT retry if you die early!^n12. No spawnkilling!^n ^nVisit our website at your website here for more info!", iName, PREFIX)<br />}<br /><br />public RoundStart(id)<br />{<br /> new iName[64];<br /> get_user_name(id, iName, 33)<br /> <br /> set_hudmessage(255, 127, 0, 0.055, 0.2, 0, 6.0, 9.5)<br /> show_hudmessage(id, "If you don't follow these rules you will be punished.^n ^n1. Obey the rules!^n2. No hacking!^n3. Spamming and/or yelling!^n4. No advertising!^n5. No funnyjumping(CT)!^n6. No free killing!^n7. No bad disconnecting!^n8. No underblocking!^n9. No understabing!^n10. Hiders are allowed to camp for 60 seconds!^n11. Do NOT retry if you die early!^n12. No spawnkilling!^n ^nVisit our website at your website here for more info!", iName, PREFIX)<br />}<br /><br />public CT_PlayerSpawn(id)<br /> if(cs_get_user_team(id) == CS_TEAM_CT)<br /> set_task(0.5, "RoundStart", id)<br /> else return;<br /><br />public ShowRulesConsole(id)<br />{<br /> <br /> console_print(id,"If you don't follow these rules you will be punished!");<br /> console_print(id,"1. Obey the rules!");<br /> console_print(id,"2. No hacking!");<br /> console_print(id,"3. No advertising!");<br /> console_print(id,"4. No funnyjumping(CT)!");<br /> console_print(id,"5. No free killing!");<br /> console_print(id,"6. No bad disconnecting!");<br /> console_print(id,"7. No underblocking!");<br /> console_print(id,"8. No understabing!");<br /> console_print(id,"9. Hiders are allowed to camp for 60 seconds!");<br /> console_print(id,"10. Do NOT retry if you die early in the round!");<br /> console_print(id,"11. No spawnkilling(10seconds)!");<br /> console_print(id,"12. Respect the admins!");<br />}</div>
<br /> <div style="padding:6px">
<fieldset class="fieldset">
<legend>Attached Files</legend>
<table cellpadding="0" cellspacing="3" border="0">
<!-- BEGIN TEMPLATE: postbit_attachment -->
<tr>
<td><img class="inlineimg" src="https://forums.allie.../attach/sma.gif" alt="File Type: sma" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="http://www.amxmodx.o...?file_id=129164"><strong>Get Plugin</strong></a> or
<a href="https://forums.allie...38;d=1388813381">Get Source</a> (HideNSeekRules.sma - 2.7 KB)
</td>
</tr>
<!-- END TEMPLATE: postbit_attachment --><!-- BEGIN TEMPLATE: postbit_attachment -->
<tr>
<td><img class="inlineimg" src="https://forums.allie...attach/amxx.gif" alt="File Type: amxx" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="https://forums.allie...38;d=1388813398">HideNSeekRules.amxx</a> (2.1 KB)
</td>
</tr>
<!-- END TEMPLATE: postbit_attachment -->
</table>
</fieldset>
</div>
<!-- END TEMPLATE: postbit_external -->
Wyświetl pełny artykuł
Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse
HideNSeek Rules
Temat rozp. Adminek AMXX.PL, 04.01.2014 06:31
Brak odpowiedzi do tego tematu
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych