Skocz do zawartości

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.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

[DOD] Weaponmod ini


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7 517
  • Lokalizacja:AMXX.PL
Offline

Napisano 13.05.2024 19:56

<div><b>GPT Description</b><br /><br />Certainly! Here's an explanation of the plugin's architecture and functionality in English, tailored for AMX Mod X and the GoldSrc engine, specifically for the Day of Defeat modification:<br /><br />1. Definition of Constants and Variables<br />Constants define types of ammunition, weapon identifiers, and other crucial values used throughout the plugin to manage logic.<br />Variables are used to store states such as the number of loaded weapons, pointers to players, and other data necessary for the plugin's operation.<br />2. Reading Configuration Files<br />The plugin reads a configuration file named w_weapons.ini, which contains information about each weapon, including damage, fire rate, models, and sounds. This data is loaded into an array g_weapons, which acts as a database for all custom weapons.<br />3. Command and Hook Registration<br />Commands, such as say and mm, are used for interacting with players through chat.<br />Hooks (HamSandwich) and events (e.g., CurWeapon) are used to intercept and modify the game's default behavior, such as firing a weapon or reloading.<br />4. Overriding Weapon Behavior<br />The plugin uses hooks to change weapon behavior at moments like firing (Ham_Weapon_PrimaryAttack and Ham_Weapon_SecondaryAttack), switching weapons (Ham_Item_Deploy), and other actions.<br />Special attention is given to customizing firing parameters, such as the delay between shots, damage, and sounds.<br />5. Updating HUD and Managing Ammunition<br />The plugin manages the display of information on the HUD, including weapon icons and ammunition count.<br />It also regulates the amount of ammunition in the magazine after reloading.<br />6. Additional Features<br />Weapon selection menu for players, allowing them to choose from available custom weapons.<br />Functions for special types of weapons, such as shotguns or mortars, which have unique behavior when fired.<br />7. Integration with the Game World<br />The plugin interacts with the game world, for example, allowing the creation of explosion effects or bullet tracers. <br />_____ <br /><b>Human descripiton </b><br />This plugin allows you to add a new weapon for the Day of Defeat Goldsrc (steam)<br />The system is based on standard weapons. We take the index of the essence of the weapon in your hands, and set the weapon code .<br />The technology by which I do this is spied on in the systems of ZombieMod CS 1.6, and KORD_172 Weaponmod and else plugins. <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">idx_wpn&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">idx&nbsp;prt&nbsp;from&nbsp;m_pActiveItem
<br />i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">idx&nbsp;line&nbsp;from&nbsp;txt&nbsp;ini&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">a&nbsp;custom&nbsp;DODW_ID&nbsp;</span><span style="color: #007700">for&nbsp;new&nbsp;</span><span style="color: #0000BB">weapon
<br />entity_set_int</span><span style="color: #007700">(</span><span style="color: #0000BB">idx_wpn</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">EV_INT_iuser4</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">i</span><span style="color: #007700">)&nbsp;
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div>After setting clip ammo, hud and models, start the registration of the Primary and Secondary attacks takes place, during which the substitution of the function takes place:<br />sound overlay (if available) / changing the attack speed<br />or if this is a special type of weapon that does not exist by default, then virtual functions are launched that simulate an attack in which you yourself prescribe a script.<br />An important feature of this option is reading parameters from a text file, which contains a list of weapons, their characteristics and everything that is needed is written to a multidimensional array with pointers. now we don't need to produce countless plugins, because here we can set a flexible configuration.<br /><br />The special code is the line number in the text . this eliminates the iteration of the search for strings with matches of special code. because this is a direct link. so be careful.<br />the plugin already provides a system of submodels in advance, you can assign 1 model file and specify the submodel number in a text file, or use unique models. the plugin already works in two modes automatically.<br />Animations and sounds of the player will be used on the basis of standard weapons that you choose as a reference base. HUD cartridges of whatever you wish from the whole list. the rest is much broader. I repeat, or you specify a special type of weapon, but this can be provided with a special type of attack.In general, the plugin architecture is very similar to the weapons system in Quake 1.<br /><br />Today, the plugin has a lot of holes and inaccuracies, and I need the help of experienced coders. I built the plugin on my knee, and every time I improve and optimize it, I would like feedback and help. we need to speed up some functions and data processing. Perhaps somewhere you should make additional checks and interrupt with a return <br /><br /><a href="https://youtu.be/Hru...N1eHiTT9X1kuwX"target="_blank" rel="nofollow noopener">Youtube demo video</a></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="https://www.amxmodx....72"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1715624188">GetSource</a> (dod_weaponmod_ini.sma - 37.0 KB)

</td>
</tr><tr>
<td><img class="inlineimg" src="https://forums.allie...attach/ini.gif"alt="File Type: ini" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>


<a href="https://forums.allie...weapons.ini</a>(1.0 KB)


</td>
</tr>
</table>
</fieldset>


</div>

Wyświetl pełny artykuł




Użytkownicy przeglądający ten temat: 1

0 użytkowników, 1 gości, 0 anonimowych