[DOD] Weaponmod ini - [RSS] Pluginy - AMXX.pl: Support AMX Mod X i SourceMod

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 512
  • Lokalizacja:AMXX.PL
Offline

Napisano 13.05.2024 19:56

GPT Description

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:

1. Definition of Constants and Variables
Constants define types of ammunition, weapon identifiers, and other crucial values used throughout the plugin to manage logic.
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.
2. Reading Configuration Files
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.
3. Command and Hook Registration
Commands, such as say and mm, are used for interacting with players through chat.
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.
4. Overriding Weapon Behavior
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.
Special attention is given to customizing firing parameters, such as the delay between shots, damage, and sounds.
5. Updating HUD and Managing Ammunition
The plugin manages the display of information on the HUD, including weapon icons and ammunition count.
It also regulates the amount of ammunition in the magazine after reloading.
6. Additional Features
Weapon selection menu for players, allowing them to choose from available custom weapons.
Functions for special types of weapons, such as shotguns or mortars, which have unique behavior when fired.
7. Integration with the Game World
The plugin interacts with the game world, for example, allowing the creation of explosion effects or bullet tracers.
_____
Human descripiton
This plugin allows you to add a new weapon for the Day of Defeat Goldsrc (steam)
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 .
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.

PHP Code:







idx_wpn = idx prt from m_pActiveItem

i 
= idx line from txt ini as a custom DODW_ID for new weapon

entity_set_int
(idx_wpn, EV_INT_iuser4, i) 









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:
sound overlay (if available) / changing the attack speed
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.
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.

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.
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.
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.

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

Youtube demo video






Wyświetl pełny artykuł




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

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