<div>After 1 Week And 2500 Lines Writing I Created My First Plugin [Counter-Strike] Weapon Mod :)<br />This Is Beta Version And There Will Be Some Bugs, So Report Them :mrgreen:<br />I Think This Mod Will Be Good For Mods Like: Base Builder, Zombie Plague (:/)<br />I Also Created Test Plugin For Example, With Resources.<br />The Mod Supports Weapon: <b>VModel, PModel, WModel, Clip, Ammo, Animations (Draw, Shoot, Reload), Deploy Time, Delay (Speed Of Weapon), Damage, Recoil, Reload Time<br /><br />Default Values Of Deploy, Delay, Damage, Recoil Are 1.0 (Of Course :))<br /><br /><font size="2">This Mod Is Not Removing Original Weapons.</font></b><br />To Open Weapon Menu Write /wmenu<br /><br /><b>Weapon Mod API:</b><br /><br />wm_register_weapon(const name[], const model[], cswpn, const fire_sound[])<br /><br />Wheres:<ul><li>name Is Weapon Name In Menu</li>
</ul><ul><li>model Is Weapon Model For v_*, p_*, w_* Models And Also For Sounds</li>
</ul><ul><li>cswpn Is CS Weapon ID CSW_*</li>
</ul><ul><li>fire_sound Is Weapon Fire Sound</li>
</ul><br />wm_register_weapon_clip(weaponid, clip)<br />This Native Is Registering Weapon Clip On Specified ID For Example:<br /><div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
<div class="alt2">
<hr />
<code style="white-space:nowrap">
<div dir="ltr" style="text-align:left;">
<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #FF8000">#include <amxmodx><br />#include <amxmisc><br />#include <weaponmod><br /><br /></span><span style="color: #007700">new </span><span style="color: #0000BB">i_weapon<br /><br /></span><span style="color: #007700">public </span><span style="color: #0000BB">plugin_init</span><span style="color: #007700">()<br />{<br /> </span><span style="color: #0000BB">register_plugin</span><span style="color: #007700">(</span><span style="color: #DD0000">"blabla"</span><span style="color: #007700">, </span><span style="color: #DD0000">"blabla"</span><span style="color: #007700">, </span><span style="color: #DD0000">"blabla"</span><span style="color: #007700">)<br />}<br /><br />public </span><span style="color: #0000BB">plugin_precache</span><span style="color: #007700">()<br />{<br /> </span><span style="color: #0000BB">i_weapon </span><span style="color: #007700">= </span><span style="color: #0000BB">wm_register_weapon</span><span style="color: #007700">(</span><span style="color: #DD0000">"blabla"</span><span style="color: #007700">, </span><span style="color: #DD0000">"blabla"</span><span style="color: #007700">, </span><span style="color: #0000BB">CSW_BLA</span><span style="color: #007700">, </span><span style="color: #DD0000">"weapons/bla-1.wav"</span><span style="color: #007700">) <br /> </span><span style="color: #0000BB">wm_register_weapon_clip</span><span style="color: #007700">(</span><span style="color: #0000BB">i_weapon</span><span style="color: #007700">, </span><span style="color: #0000BB">clip</span><span style="color: #007700">)<br />}
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div>natives wm_register_weapon_ammo/deploy/delay/damage/recoil/reload/ Are Same.<br /><br />native wm_register_weapon_anims(weaponid, anim_draw, anim_shoot, anim_reload)<ul><li>weaponid Is Weapon ID (Not CSW_*)</li>
</ul><ul><li>anim_draw Is Weapon Draw Animation ID (Check Your Model (V_*) And See In Animations The First One Is 0)</li>
</ul><ul><li>anim_shoot Is Weapon Shoot Animation ID</li>
</ul><ul><li>anim_reload Is Weapon Reload Animation ID</li>
</ul><br />native wm_register_weapon_sprite(weaponid, const sprite[], file1[], file2[])<ul><li>weaponid Is Weapon ID</li>
</ul><ul><li>sprite Is New Sprite Of Weapon Example "weapon_ethereal"</li>
</ul><ul><li>file1 Is Free File If You Dont Type In It Anything Is Willnt Precache (This Is For Sprite)(Like "sprites/weaponmod/640hud1.spr")</li>
</ul><ul><li>file2 Is Same Too.</li>
</ul><br />native wm_register_weapon_attack2(weaponid, attack2_type)<ul><li>weaponid Is Weapon ID.</li>
</ul><ul><li>attack2_type Can Be 1/2/3 For Now If U Dont Want Attack2 Just Dont Register :mrgreen:<br />These 1/2/3 Types Are Zoom (1=AUGSG552 Zoom | 2=Sniper Only First Zoom | 3=Sniper First And Second Zoom).</li>
</ul><br /><b>More Features & Bug Fixes Are Comming In Next Version.</b></div>
<br /> <div style="padding:6px">
<fieldset class="fieldset">
<legend>Attached Files</legend>
<table cellpadding="0" cellspacing="3" border="0">
<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...60"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1452014414">GetSource</a> (weapon_mod.sma - 142.5 KB)
</td>
</tr><tr>
<td><img class="inlineimg" src="https://forums.allie...attach/zip.gif"alt="File Type: zip" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="https://forums.allie...od_test.zip</a>(654.0 KB)
</td>
</tr>
</table>
</fieldset>
</div>
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
[CS] Weapon Mod Beta 0.7
Temat rozp. Adminek AMXX.PL, 05.01.2016 18:41
Brak odpowiedzi do tego tematu
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych