Raised This Month: $90 Target: $400
 22% 

Module: Counter-Strike Weapon Mod [1.7.1]


Post New Thread Reply   
 
Thread Tools Display Modes
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 12-26-2018 , 05:54   Re: Module: Counter-Strike Weapon Mod [1.7]
Reply With Quote #41

Quote:
Originally Posted by quLeryuzz View Post
Can you add native like GiveWeaponByName? It will not be sending drop command to player. Because I wrote somethings and I approached.
Code:
public plugin_precache()
{
    BuildWeaponModels(Weapon, VMODELI, PMODELI, WMODELI);
}
public plugin_init()
{
    register_forward(FM_Touch,"FM_Touch_hook")
    register_clcmd("drop","dropped")
}
public dropped(id)
{
    justdropped[id]=true
    set_task(0.5,"notdropped",id)
}
public notdropped(id) justdropped[id]=false

public FM_Touch_hook(weaponbox,id)
{
    if(id && is_user_alive(id) && !is_user_bot(id) && pev_valid(weaponbox) && !justdropped[id])
    {
        static classname[64]
        pev(weaponbox,pev_classname,classname,63)
        if(equali(classname,"weaponbox"))
        {
            pev(weaponbox,pev_model,classname,63)
            if(equali(classname,WMODELI))
            {
                client_print_color(id, id, "dogru/true")
                justdropped[id]=true
                set_task(0.5,"notdropped",id)
                GiveWeaponByName(id,"laserm")
                if(pev_valid(weaponbox)) engfunc(EngFunc_RemoveEntity,weaponbox)
            }
        }
    }
}
give_item doesn't send drop command. But your GiveWeaponByName native send drop command.
Does this have anything to do with it? https://github.com/CodeGhosty/CSWM/b.../CSWM.cpp#L989

---
And I think you can add SlotID to weapons. Because u added hud to weapons.

I'm waiting next version. A very successful module.
If i wont drop weapon then it will replace current one of its type.
Yes SlotID is possible but why should i when you can only hand 1 weapon at time.
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)

Last edited by Ghosted; 12-26-2018 at 05:55.
Ghosted is offline
Reply


Thread Tools
Display Modes

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 21:00.


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