Raised This Month: $ Target: $400
 0% 

Strip weapon


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
vato loco [GE-S]
Veteran Member
Join Date: Oct 2006
Location: Germany
Old 05-19-2009 , 04:37   Re: Strip weapon
Reply With Quote #8

hi....i hope this is what you want

PHP Code:
/*================================================================================

-----------------------------------
-*- [ZP] Extra Item : Spartan -*-
-----------------------------------

~~~~~~~~~~~~~~~
- Description -
~~~~~~~~~~~~~~~

A Spartan has Multipy Damage x10000.

================================================================================*/
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
#include <hamsandwich>

#define is_valid_player(%1) (1 <= %1 <= 32)

new g_itemidpcvar_dmgmultiplier
new bool:g_Hasspartan[33]

public 
plugin_init()
{
    
register_plugin("[ZP] Extra: Spartan ( Multipy Damage x10000 )""1.0""ƒa†es™")
    
g_itemid zp_register_extra_item("Spartan ( Multipy Damage x10000 )"0ZP_TEAM_HUMAN)
    
pcvar_dmgmultiplier register_cvar("zp_awp_dmg_multiplier""10000")
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1)
    
register_event("HLTV","new_round""a","1=0""2=0")
    
register_forward(FM_ClientConnect"client_connect")
    
register_forward(FM_ClientDisconnect"client_disconnect")
}
public 
new_round()
{
    for(new 
032i++)
    {
        
g_Hasspartan[i] = false
    
}
}
public 
client_connect(id)
{
    
g_Hasspartan[id] = false
}
public 
client_disconnect(id)
{
    
g_Hasspartan[id] = false
}
public 
Death()
{
    
g_Hasspartan[read_data(2)] = false
}
public 
fwHamPlayerSpawnPost(id)
{
    
g_Hasspartan[id] = false
}
public 
zp_user_infected_post(id)
{
    if (
zp_get_user_zombie(id))
    {
        
g_Hasspartan[id] = false
    
}
}

public 
fw_TakeDamage(victiminflictorattackerFloat:damage)
{
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_KNIFE && g_Hasspartan[attacker] )
    {
        
SetHamParamFloat(4damage get_pcvar_floatpcvar_dmgmultiplier ) )
    }
}
public 
zp_extra_item_selected(iditemid)
{
    if ( 
itemid == g_itemid )
    {
        
fm_weaponstrip(id0)
        
set_pev(idpev_armorvaluefloat(pev(idpev_armorvalue)) + 1500.0)
        
set_pev(idpev_healthfloat(pev(idpev_health)) + 1500.0)
        
set_pev(idpev_gravityfloat(pev(idpev_gravity)) + 0.7)
        
fm_user_rendering(idkRenderFxGlowShell22500kRenderNormal16)
        
client_print(idprint_chat"[ZP] You has bought Spartan")
        
g_Hasspartan[id] = true;
    }
}
stock fm_weaponstrip(idnoknife=0)
{
    static 
ent
    ent 
engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"player_weaponstrip"))
    if(!
pev_valid(ent)) return 0
    dllfunc
(DLLFunc_Spawnent)
    
dllfunc(DLLFunc_Useentid)
    if(!
noknife)fm_give_item(id,"weapon_knife")
    
engfunc(EngFunc_RemoveEntityent)
    return 
1
}
stock fm_give_item(id, const item[])
{
    static 
ent
    ent 
engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocStringitem))
    if (!
pev_valid(ent)) return;
    
    static 
Float:originF[3]
    
pev(idpev_originoriginF)
    
set_pev(entpev_originoriginF)
    
set_pev(entpev_spawnflagspev(entpev_spawnflags) | SF_NORESPAWN)
    
dllfunc(DLLFunc_Spawnent)
    
    static 
save
    save 
pev(entpev_solid)
    
dllfunc(DLLFunc_Touchentid)
    if (
pev(entpev_solid) != save)
        return;
    
    
engfunc(EngFunc_RemoveEntityent)
}
stock fm_set_rendering(entityfx kRenderFxNone255255255render kRenderNormalamount 16) {
    new 
Float:RenderColor[3];
    
RenderColor[0] = float(r);
    
RenderColor[1] = float(g);
    
RenderColor[2] = float(b);
    
set_pev(entitypev_renderfxfx);
    
set_pev(entitypev_rendercolorRenderColor);
    
set_pev(entitypev_rendermoderender);
    
set_pev(entitypev_renderamtfloat(amount));
    return 
1;

strip user weapons without knife
PHP Code:
fm_weaponstrip(id0
strip user all weapons
PHP Code:
fm_weaponstrip(id1
__________________

Last edited by vato loco [GE-S]; 05-19-2009 at 05:20.
vato loco [GE-S] 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 01:35.


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