Raised This Month: $ Target: $400
 0% 

Don't give usp and glock


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-24-2017 , 17:07   Re: Don't give usp and glock
Reply With Quote #4

Quote:
Originally Posted by EFFx View Post
That makes absolutely no sense.

You can use this

PHP Code:
stock ham_strip_weapon(id,weapon[])
{
    if(!
equal(weapon,"weapon_",7)) return 0;

    new 
wId get_weaponid(weapon);
    if(!
wId) return 0;

    new 
wEnt;
    while((
wEnt engfunc(EngFunc_FindEntityByString,wEnt,"classname",weapon)) && pev(wEnt,pev_owner) != id) {}
    if(!
wEnt) return 0;

    if(
get_user_weapon(id) == wIdExecuteHamB(Ham_Weapon_RetireWeapon,wEnt);

    if(!
ExecuteHamB(Ham_RemovePlayerItem,id,wEnt)) return 0;
    
ExecuteHamB(Ham_Item_Kill,wEnt);

    
set_pev(id,pev_weapons,pev(id,pev_weapons) & ~(1<<wId));

    if(
wId == CSW_C4)
    {
        
cs_set_user_plant(id,0,0);
        
cs_set_user_bpammo(id,CSW_C4,0);
    }
    else if(
wId == CSW_SMOKEGRENADE || wId == CSW_FLASHBANG || wId == CSW_HEGRENADE)
        
cs_set_user_bpammo(id,wId,0)

    return 
1;

Use

PHP Code:
ham_strip_weapon(id,"weapon_glock18"
It doesn't give me Glock/ USP on surf maps. Actually the stock you pasted doesn't make any sense.

Try this
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <engine>

#define PLUGIN "Remove game_player_equip entity"
#define VERSION "1.0"
#define AUTHOR "DoNii"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    static 
ent  
    ent 
= -1  
    
    
while ((ent find_ent_by_class(ent"game_player_equip")))  
    {          
        if(
pev_valid(ent)) remove_entity(ent)  
    }  

__________________

Last edited by edon1337; 01-24-2017 at 17:13.
edon1337 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 20:45.


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