This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[DOD] Weapons Equipment by Steam ID


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 05-13-2024 , 06:23   [DOD] Weapons Equipment by Steam ID
Reply With Quote #1

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.



It reads from the ini file the list of available weapons for a specific steam ID
After the first launch, it creates a file with the following content:
addons/amxmodx/configs/ck_custom_equip.ini
PHP Code:
STEAM_0:1:168151617 weapon_enfield weapon_sten 
I can make the plugin work in two modes:
classic is when your current weapon falls out of your hands and a new one comes out.
and secondary is when two primary weapons are placed in 1 slot. it's like having two rifles.

___________
The plugin was created at the request of the administrator. However, before continuing my work, I want to ask the professionals.

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.
Can we translate a list of weapons into bitmasks.
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?
Attached Files
File Type: sma Get Plugin or Get Source (dod_ck_customequip.sma - 32 views - 7.9 KB)
__________________

Last edited by TheVaskov; 05-13-2024 at 08:11.
TheVaskov is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode