Raised This Month: $32 Target: $400
 8% 

[Request]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eNNkds
Member
Join Date: Sep 2012
Location: Romania
Old 12-28-2018 , 12:30   [Request]
Reply With Quote #1

Hello. can somebody to remove include <zombieplague> and add <gunxpmod>?

PHP Code:
#include <amxmodx>
#include <engine>
#include <zombieplague>
#include <hamsandwich>
#include <fun>
#include <fakemeta_util>

#define PLUGIN "[ZP] Extra Item: Force Field Grenade"
#define VERSION "v2.3"
#define AUTHOR "lucas_7_94" // Thanks To Users in credits too!.

#define CAMPO_ROUND_NAME "Force Shield (Complete Round)"
#define CAMPO_TIME_NAME "Force Shield (Short-Time)"
#define ValidTouch(%1) ( is_user_alive(%1) && ( zp_get_user_zombie(%1) || zp_get_user_nemesis(%1) ) )

/*=============================[Plugin Customization]=============================*/
//#define CAMPO_TASK
#define CAMPO_ROUND

//#define RANDOM_COLOR
#define ONE_COLOR

new const NADE_TYPE_CAMPO 6545

#if defined ONE_COLOR
new Float:CampoColors] = { 255.0 0.0 ,   0.0  }
#endif

new TrailColor] = { 000255255 }
new 
Float:Maxs] = { 100.0 100.0 100.0 }
new 
Float:Mins] = { -100.0, -100.0, -100.0 }

new const 
model_grenade[] = "models/zombie_plague/v_auragren.mdl"
new const model[] = "models/zombie_plague/aura8.mdl"
new const w_model[] = "models/zombie_plague/w_aura.mdl"
new const sprite_grenade_trail[] = "sprites/laserbeam.spr"
new const entclas[] = "campo_grenade_forze"

new cvar_flaregrenadesg_trailSprg_SayTextg_itemID

new gBomb
const Float:Push 15.0

const item_cost 15
/*=============================[End Customization]=============================*/

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Think"grenade""fw_ThinkGrenade")
    
    
RegisterHam(Ham_Killed"player""fw_PlayerKilled")
    
    
cvar_flaregrenades get_cvar_pointer("zp_flare_grenades")
    
    
register_forward(FM_SetModel"fw_SetModel")
    
    
RegisterHam(Ham_Item_Deploy"weapon_smokegrenade""shield_deploy"1)
    
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
    
register_forward(FM_Touch"fw_touch")
    
    
g_SayText get_user_msgid("SayText")
    
    
register_cvar("zp_shield_creator""lucas_7_94"FCVAR_SERVER|FCVAR_PROTECTED)
    
    
#if defined CAMPO_ROUND
    
g_itemID zp_register_extra_item CAMPO_ROUND_NAME item_cost ZP_TEAM_HUMAN )
    
#else 
    
g_itemID zp_register_extra_item CAMPO_TIME_NAME item_cost ZP_TEAM_HUMAN )
    
#endif        
}

public 
event_round_start() {
    
    
#if defined CAMPO_ROUND
    
remove_entity_name(entclas)
    
#endif
    
    
gBomb 0
}

public 
plugin_precache() {
    
    
g_trailSpr engfunc(EngFunc_PrecacheModelsprite_grenade_trail)
    
engfunc(EngFunc_PrecacheModelmodel_grenade)
    
engfunc(EngFunc_PrecacheModelmodel)
    
engfunc(EngFunc_PrecacheModelw_model)
}

public 
client_disconnect(id
    
gBomb &= ~( << ( id 32 ) )

public 
zp_extra_item_selected(playeritemid) {
    
    if(
itemid == g_itemID)
    {
        if( 
gBomb & ( << ( player 32 ) ) )
            
Color(player"!g[Shield]!y You already have a force field")
        else 
        {
            
gBomb |= ( << ( player 32 ) )
            
            if( !
user_has_weaponplayerCSW_SMOKEGRENADE ) )
                
give_item(player,"weapon_smokegrenade")
            
            
            
#if defined CAMPO_ROUND
            
Color(player"!g[Shield]!y You Bought a force field!. This, lasts 1 round complete.")
            
#else
            
Color(player"!g[Shield]!y You Bought a force field!. This, lasts very little!")
            
#endif
        
}
        
        
    }
    
}
public 
fw_PlayerKilled(victimattackershouldgib)
{
    if( ( 
<= attacker <= 32 ) && ( gBomb & ( << ( victim 32 ) ) ) ) 
        
gBomb &= ~( << ( victim 32 ) )
}

public 
fw_ThinkGrenade(entity) {   
    
    if(!
pev_valid(entity)) return HAM_IGNORED
    
    
static Float:dmgtime   
    pev
(entitypev_dmgtimedmgtime)
    
    if (
dmgtime get_gametime())
        return 
HAM_IGNORED   
    
    
if(pev(entitypev_flTimeStepSound) == NADE_TYPE_CAMPO)
        
crear_ent(entity)
    
    return 
HAM_SUPERCEDE
}


public 
fw_SetModel(entity, const model[]) {    
    
    static 
Float:dmgtime
    pev
(entitypev_dmgtimedmgtime)
    
    if (
dmgtime == 0.0)
        return 
FMRES_IGNORED;
    
    if (
equal(model[7], "w_sm"4))
    {        
        new 
owner pev(entitypev_owner)        
        
        if( 
is_user_alive(owner) && !zp_get_user_zombie(owner) && ( gBomb & ( << ( owner 32 ) ) ) ) 
        {
            
set_pcvar_num(cvar_flaregrenades,0)            
            
            
fm_set_rendering(entitykRenderFxGlowShell000255255kRenderNormal16)
            
            
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
            
write_byte(TE_BEAMFOLLOW// TE id
            
write_short(entity// entity
            
write_short(g_trailSpr// sprite
            
write_byte(10// life
            
write_byte(10// width
            
write_byte(TrailColor]) // r
            
write_byte(TrailColor]) // g
            
write_byte(TrailColor]) // b
            
write_byte(500// brightness
            
message_end()
            
            
set_pev(entitypev_flTimeStepSoundNADE_TYPE_CAMPO)
            
            
set_task(6.0"DeleteEntityGrenade" ,entity)
            
gBomb &= ~( << ( owner 32 ) )
            
entity_set_model(entityw_model)
            return 
FMRES_SUPERCEDE
        
}
    }
    return 
FMRES_IGNORED
    
}

public 
DeleteEntityGrenade(entity
    if( 
is_valid_ententity ) )
        
remove_entity(entity)

public 
crear_ent(id) {
        
    
set_pcvar_num(cvar_flaregrenades,1)
    
    
// Create entitity
    
new iEntity create_entity("info_target")
    
    if(!
is_valid_ent(iEntity))
        return 
PLUGIN_HANDLED
    
    
new FloatOrigin[3
    
entity_get_vector(idEV_VEC_originOrigin
    
    
entity_set_string(iEntityEV_SZ_classnameentclas)
    
    
entity_set_vector(iEntity,EV_VEC_originOrigin)
    
entity_set_model(iEntity,model)
    
entity_set_int(iEntityEV_INT_solidSOLID_TRIGGER)
    
entity_set_size(iEntityMinsMaxs )
    
entity_set_int(iEntityEV_INT_renderfxkRenderFxGlowShell)
    
entity_set_int(iEntityEV_INT_rendermodekRenderTransAlpha)
    
entity_set_float(iEntityEV_FL_renderamt50.0)
    
    
#if defined RANDOM_COLOR
    
if(is_valid_ent(iEntity))
    {
        new 
Float:vColor[3]
        
        for(new 
i3i++)
            
vColor[i] = random_float(0.0255.0)
        
        
entity_set_vector(iEntityEV_VEC_rendercolorvColor)
    }
    
#endif
    
    #if defined ONE_COLOR
    
entity_set_vector(iEntityEV_VEC_rendercolorCampoColors)
    
#endif
    
    #if defined CAMPO_TASK
    
set_task(15.0"DeleteEntity"iEntity)
    
#endif
    
    
    
return PLUGIN_CONTINUE;
}

public 
zp_user_infected_post(infectedinfector
    if ( 
gBomb & ( << ( infected 32 ) ) ) 
        
gBomb &= ~( << ( infected 32 ) ) 

public 
fw_touch(enttouched)
{
    if ( !
pev_valid(ent) ) return FMRES_IGNORED;
    static 
entclass[32];
    
pev(entpev_modelentclass31);
    
    if ( 
strcmpentclassmodel ) == )
    {    
        if( 
ValidTouch(touched) )
        {
            static 
Float:pos_ptr[3], Float:pos_ptd[3]
            
            
pev(entpev_originpos_ptr)
            
pev(touchedpev_originpos_ptd)
            
            for(new 
03i++)
            {
                
pos_ptd[i] -= pos_ptr[i]
                
pos_ptd[i] *= Push
            
}
            
set_pev(touchedpev_velocitypos_ptd)
            
set_pev(touchedpev_impulsepos_ptd)
        }
    }
    return 
FMRES_HANDLED
}


public 
DeleteEntityentity )  // Thanks xPaw For The Code =D
    
if( is_valid_ententity ) ) 
    
remove_entityentity );

stock Color(const id, const input[], any:...)
{
    static 
msg[191]
    
vformat(msg190input3)
    
    
replace_all(msg190"!g""^4")
    
replace_all(msg190"!y""^1")
    
replace_all(msg190"!t""^3")
    
    
message_begin(MSG_ONE_UNRELIABLEg_SayText_id)
    
write_byte(id)
    
write_string(msg)
    
message_end()
}

public 
shield_deployshield_ent )
{
    if( 
pev_validshield_ent ) != )
        return 
HAM_IGNORED;
    
    static const 
mPlayer 41
    
    
new id get_pdata_cbaseshield_entmPlayer);
    
    if( ( 
gBomb & ( << ( id 32 ) ) ) && !zp_get_user_zombieid ) )
        
set_pevidpev_viewmodel2model_grenade );
    
    return 
HAM_IGNORED;

PHP Code:
// Gun Xp Mod Include File //
#if defined _gunxpmod_included
  #endinput
#endif
#define _gunxpmod_included

#if !defined charsmax
    #define charsmax(%1) sizeof(%1)-1
#endif 

// Returns player Experience.
native get_user_xp(id)

// Sets player Experience.
native set_user_xp(idamount)

// Returns player Level.
native get_user_level(id)

// Sets player Level.
native set_user_level(idamount)

// Returns player Level by Xp.
native get_user_max_level(id)

// Register Item.
stock find_itemplugin()
{
    for(new 
0get_pluginsnum(); ++i)
    {
        new 
temp[2], name[64]
        
get_plugin(iname63temp1temp1temp1temp1)
         if(
equali(name"gunxpmod_shop.amxx")) {
             return 
i;
        }
    }
     return -
1;
}

stock find_itemindex()
{
    new 
temp[2], name[64], pluginname[64]
    
get_plugin(-1pluginname63temp1temp1temp1temp1)
    for (new 
0get_pluginsnum(); ++i)
    {
        
get_plugin(iname63temp1temp1temp1temp1)
         if(
equal(namepluginname))
        {
             return 
i
        
}
    }
     return -
1
}

stock register_gxm_item(item_name[], item_desc[], item_cost)
{
    new 
item_index find_itemindex()
    new 
itemplugin find_itemplugin()
    new 
itemregfunc get_func_id("register_item_gxm"itemplugin)

    new 
temp callfunc_begin_i(itemregfuncitemplugin)
    if(
temp == -|| temp == -2)
    {
        if(
temp == -2
        {
            
log_amx("You have to many items, and need to increase the MAX_UNLOCKS define!")
        } 
        else 
        {
            
log_amx("A unkown error has happend, make sure the Upgrades plugin is loaded!")
        }
        return 
PLUGIN_HANDLED;        
    }

    
callfunc_push_int(item_index)
    
callfunc_push_str(item_name)
    
callfunc_push_str(item_desc)
    
callfunc_push_int(item_cost)
    
    
temp callfunc_end()
    if(
temp == -|| temp == -2
    {
        return 
PLUGIN_HANDLED;
    }
    return 
temp;
}
stock client_printcolor(const id, const input[], any:...)
{
    new 
count 1players[32];
    static 
msg[191];
    
vformat(msg,190,input,3);
    
replace_all(msg,190,"/g","^4");// green txt
    
replace_all(msg,190,"/y","^1");// orange txt
    
replace_all(msg,190,"/ctr","^3");// team txt
    
replace_all(msg,190,"/w","^0");// team txt
    
if (idplayers[0] = id; else get_players(players,count,"ch");
    for (new 
i=0;i<count;i++)
        if (
is_user_connected(players[i]))
        {
            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]);
            
write_byte(players[i]);
            
write_string(msg);
            
message_end();
        }

eNNkds is offline
Send a message via Skype™ to eNNkds
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 12-28-2018 , 12:58   Re: [Request]
Reply With Quote #2

I was going to reply, but I'll wait for the Ocix to come and complain about the title of the post. It's really complicated lately.
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-28-2018 , 13:45   Re: [Request]
Reply With Quote #3

Quote:
Originally Posted by iceeedr View Post
I was going to reply, but I'll wait for the Ocix to come and complain about the title of the post. It's really complicated lately.
Sorry for being late!

Quote:
Originally Posted by OciXCrom View Post
Imagine what the forum would look like if every thread had a title like yours. Put a proper descriptive title if you want to get taken seriously.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 12-29-2018 , 07:41   Re: [Request]
Reply With Quote #4

How tf did you get this posted if your keyboard is broken???
redivcram is offline
Reply



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 17:16.


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