View Single Post
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-05-2023 , 06:43   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #107

I've configured the slot redirection to put the RPG-7 in slot 4.
However, the RPG-7 does not appear in slot 4 as expected. Instead, it shows up in slots 1, 2, 3, and 5 without any issues.

I've double-checked my configuration files and scripts, but I can't figure out what's causing this problem. I would greatly appreciate it if someone could help me troubleshoot this issue and provide guidance on how to make the RPG-7 appear in slot 4 as intended.


PHP Code:
#define PRI_AMMO_ID 2
#define SLOT_ID 3
#define NUM_IN_SLOT 1
#define ITEM_FLAGS 0

RegisterHam(Ham_Item_ItemSlotWEAPON_BASE_ENT"@Ham_CBasePlayer_ItemSlot");
    
@
Ham_CBasePlayer_ItemSlot( const item )
{
    
SetHamReturnInteger(SLOT_ID 1);
    return 
HAM_SUPERCEDE;
}

public 
fw_Item_AddToPlayer_Post(entid) {
    switch(
entity_get_int(entEV_INT_impulse)) {
        case 
0UTIL_Weaponlist(idWEAPON_BASE_ENTPRI_AMMO_ID9001WEAPON_BASE_CSW0);
        case 
WEAPON_SPECIAL_KEYUTIL_Weaponlist(idWEAPON_SPRITE_NAMEPRI_AMMO_IDWEAPON_AMMOSLOT_IDNUM_IN_SLOTWEAPON_BASE_CSWITEM_FLAGS);
    }

Attached Files
File Type: sma Get Plugin or Get Source (ze_extra_rpg7.sma - 98 views - 19.2 KB)
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 09-06-2023 at 07:10. Reason: Solved: #define NUM_IN_SLOT 4
Supremache is offline