Raised This Month: $ Target: $400
 0% 

Please remove solid object


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Biel
Member
Join Date: May 2012
Old 06-30-2012 , 10:46   Please remove solid object
Reply With Quote #1

Please remove solid object
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta_util>
#include <hamsandwich>
#include <zombieplague>

#define PLUGIN "drop"
#define VERSION "1.0"
#define AUTHOR "none"

new cvar_giveammo

new model[] = "models/chick.mdl"
new sound[] = "zombie_plague/galinha.wav"

new const item_class_name[] = "ammo"

public plugin_precache()
{
    
precache_model(model)
    
precache_sound(sound)
}

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
register_forward(FM_Touch"fwd_Touch")
    
RegisterHam(Ham_Killed"player""fw_PlayerKilled")

    
cvar_giveammo register_cvar("zp_zm-hm_kill_drop_ap""2")
}

public 
event_round_start()
{    
    new 
ent FM_NULLENT
    
static string_class[] = "classname"
    
while ((ent engfunc(EngFunc_FindEntityByStringentstring_classitem_class_name))) 
        
set_pev(entpev_flagsFL_KILLME)
}

public 
fwd_Touch(touchertouched)
{
    if (!
is_user_alive(toucher) || !pev_valid(touched))
            return 
FMRES_IGNORED

    
new classname[32]
    
pev(touchedpev_classnameclassname31)

    if (!
equal(classnameitem_class_name))
        return 
FMRES_IGNORED

    zp_set_user_ammo_packs
(toucherzp_get_user_ammo_packs(toucher) + get_pcvar_num(cvar_giveammo))
    
client_print(toucherprint_chat"[ZP] Voce pegou a Galinha Gift e Ganhou 2 Ammo Pack(s).")
    
emit_sound(toucherCHAN_AUTOsound1.0ATTN_NORM0PITCH_NORM)

    
set_pev(touchedpev_effectsEF_NODRAW)
    
set_pev(touchedpev_solidSOLID_NOT)

    return 
FMRES_IGNORED
}

public 
fw_PlayerKilled(victimattackershouldgib)
{
    new 
origin[3]
    
get_user_origin(victim origin)

    
addItem(origin)
}

public 
addItem(origin[3])
{
    new 
ent fm_create_entity("info_target")
    
set_pev(entpev_classnameitem_class_name)
    
    
engfunc(EngFunc_SetModel,entmodel)

    
set_pev(entpev_minsFloat:{-10.0,-10.0,0.0})
    
set_pev(entpev_maxsFloat:{10.0,10.0,25.0})
    
set_pev(entpev_sizeFloat:{-10.0,-10.0,0.0,10.0,10.0,25.0})
    
engfunc(EngFunc_SetSizeentFloat:{-10.0,-10.0,0.0},Float:{10.0,10.0,25.0})

    
set_pev(entpev_solidSOLID_BBOX)
    
set_pev(entpev_movetypeMOVETYPE_TOSS)
    
    new 
Float:fOrigin[3]
    
IVecFVec(originfOrigin)
    
set_pev(entpev_originfOrigin)
    
    
set_pev(entpev_renderfxkRenderFxGlowShell)

    new 
Float:velocity[3];
    
pev(entpev_velocityvelocity);
    
velocity[2] = random_float(265.0,285.0);
    
set_pev(entpev_velocityvelocity)

    switch(
random_num(1,4))
    {
            case 
1set_pev(entpev_rendercolorFloat:{0.0,0.0,255.0})
            case 
2set_pev(entpev_rendercolorFloat:{0.0,255.0,0.0})
            case 
3set_pev(entpev_rendercolorFloat:{255.0,0.0,0.0})
            case 
4set_pev(entpev_rendercolorFloat:{255.0,255.0,255.0})
        }

Biel 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:22.


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