←  [RSS] Pluginy

AMXX.pl: Support AMX Mod X i SourceMod

»

[DOD] Weapons Equipment by Steam ID

Adminek AMXX.PL - zdjęcie Adminek AMXX.PL 13.05.2024

<div>This plugin opens a simple menu when you respawn after death with a choice of weapons that are available to you as a VIP player.<br /><br /><a class="proxied-img-link" href="https://i.postimg.cc...onner-huds.png"rel="nofollow noopener"><img class="proxied-img" src="https://forums.alliedmods.net/image-proxy/576308351337e73ecc64eec7f47b4c41e2d5a409/68747470733a2f2f692e706f7374696d672e63632f43355a6b517676442f646f642d6361656e2d646f6e6e65722d687564732e706e67" border="0" alt="" /></a><br /><br />It reads from the ini file the list of available weapons for a specific steam ID<br />After the first launch, it creates a file with the following content:<br />addons/amxmodx/configs/ck_custom_equip.ini<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">STEAM_0</span><span style="color: #007700">:</span><span style="color: #0000BB">1</span><span style="color: #007700">:</span><span style="color: #0000BB">168151617&nbsp;weapon_enfield&nbsp;weapon_sten&nbsp;
<br /></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div>I can make the plugin work in two modes:<br />classic is when your current weapon falls out of your hands and a new one comes out.<br />and secondary is when two primary weapons are placed in 1 slot. it's like having two rifles.<br /><br />___________ <br />The plugin was created at the request of the administrator. However, before continuing my work, I want to ask the professionals.<br /><br />Each time it spawns, the plugin again accesses the text file and processes it. It's fast and easy when I test it on a home server. but when such a function is repeated every respawn for 32 players, I suspect it will be difficult.<br />Can we translate a list of weapons into bitmasks.<br />or does it make sense to create a multidimensional text array for each player and parse the data into it, and then process it from the RAM?</div>

Wyświetl pełny artykuł
Odpowiedz