Shield force for human
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
Shield force for human
Hey, what do you think about Shield force for human? Is it good thing for our zombie escape mod? I think it's interesting but this shield should exist max. 3-4 seconds and should be expensive. Zombies have madness, human can have shield Is it possbile to covert?
http://zombie-mod.ru/counter-strike/zom ... force.html
http://zombie-mod.ru/counter-strike/zom ... force.html
-
- Veteran Member
- Posts: 678
- Joined: 7 years ago
- Location: Paraguay
- Contact:
yes it possible to convert but u posted it in the wrong section
Nobody Is That Busy If They Make Time
-
- Veteran Member
- Posts: 678
- Joined: 7 years ago
- Location: Paraguay
- Contact:
But i don't think it is a very good idea although it is a interesting plugin .... Humans in sheild how will zombie infect?
Nobody Is That Busy If They Make Time
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
Zombie can infect when shield force is over (shield force exists only 3 seconds, its not too long)
-
- Veteran Member
- Posts: 678
- Joined: 7 years ago
- Location: Paraguay
- Contact:
U are saying this has time ? ok if u want it i will convert if for you tomorrowczirimbolo wrote: ↑7 years ago Zombie can infect when shield force is over (shield force exists only 3 seconds, its not too long)
Nobody Is That Busy If They Make Time
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
-
- Veteran Member
- Posts: 678
- Joined: 7 years ago
- Location: Paraguay
- Contact:
u want this to be convert to ZE Human extra items or zombie ?
Nobody Is That Busy If They Make Time
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
-
- Veteran Member
- Posts: 678
- Joined: 7 years ago
- Location: Paraguay
- Contact:
OK Tonight
Nobody Is That Busy If They Make Time
-
- Veteran Member
- Posts: 678
- Joined: 7 years ago
- Location: Paraguay
- Contact:
Ok I have converted it here try it bro and test it and after testing it report it here if it works properly
Ok bro code updated Try Again
Ok bro code updated Try Again
- #include <zombie_escape>
- #include <fun>
- #include <fakemeta_util>
- #define PLUGIN "[ZE] Extra Item: Force Field Grenade"
- #define VERSION "v2.3"
- #define AUTHOR "lucas_7_94 + ZE DEV TEAM" // 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) && ( ze_is_user_zombie(%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[ 3 ] = { 255.0 , 0.0 , 0.0 }
- #endif
- new TrailColor[ 3 ] = { 000, 255, 255 }
- new Float:Maxs[ 3 ] = { 100.0 , 100.0 , 100.0 }
- new Float:Mins[ 3 ] = { -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_flaregrenades, g_trailSpr, g_SayText, g_iItemID
- new gBomb
- const Float:Push = 15.0
- /*=============================[End Customization]=============================*/
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- 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_iItemID = ze_register_item("Force Shield (One Round)", 30)
- #else
- g_iItemID = ze_register_item("Force Shield (Limited Time)", 10)
- #endif
- }
- public event_round_start() {
- #if defined CAMPO_ROUND
- remove_entity_name(entclas)
- #endif
- gBomb = 0
- }
- public plugin_precache() {
- g_trailSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_trail)
- engfunc(EngFunc_PrecacheModel, model_grenade)
- engfunc(EngFunc_PrecacheModel, model)
- engfunc(EngFunc_PrecacheModel, w_model)
- }
- public client_disconnect(id)
- gBomb &= ~( 1 << ( id % 32 ) )
- public ze_select_item_post(player, itemid) {
- if(itemid == g_iItemID)
- return
- {
- if( gBomb & ( 1 << ( player % 32 ) ) )
- Color(player, "!g[Shield]!y You already have a force field")
- else
- {
- gBomb |= ( 1 << ( player % 32 ) )
- if( !user_has_weapon( player, CSW_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 ze_select_item_pre(id, itemid)
- {
- // This not our item?
- if (itemid != g_iItemID)
- return ZE_ITEM_AVAILABLE
- // Available for Humans only, So don't show it for zombies
- if (ze_is_user_zombie(id))
- return ZE_ITEM_DONT_SHOW
- // Finally return that it's available
- return ZE_ITEM_AVAILABLE
- }
- public fw_PlayerKilled(victim, attacker, shouldgib)
- {
- if( ( 1 <= attacker <= 32 ) && ( gBomb & ( 1 << ( victim % 32 ) ) ) )
- gBomb &= ~( 1 << ( victim % 32 ) )
- }
- public fw_ThinkGrenade(entity) {
- if(!pev_valid(entity)) return HAM_IGNORED
- static Float:dmgtime
- pev(entity, pev_dmgtime, dmgtime)
- if (dmgtime > get_gametime())
- return HAM_IGNORED
- if(pev(entity, pev_flTimeStepSound) == NADE_TYPE_CAMPO)
- crear_ent(entity)
- return HAM_SUPERCEDE
- }
- public fw_SetModel(entity, const model[]) {
- static Float:dmgtime
- pev(entity, pev_dmgtime, dmgtime)
- if (dmgtime == 0.0)
- return FMRES_IGNORED;
- if (equal(model[7], "w_sm", 4))
- {
- new owner = pev(entity, pev_owner)
- if( is_user_alive(owner) && !ze_is_user_zombie(owner) && ( gBomb & ( 1 << ( owner % 32 ) ) ) )
- {
- set_pcvar_num(cvar_flaregrenades,0)
- fm_set_rendering(entity, kRenderFxGlowShell, 000, 255, 255, kRenderNormal, 16)
- message_begin(MSG_BROADCAST, SVC_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[ 0 ]) // r
- write_byte(TrailColor[ 1 ]) // g
- write_byte(TrailColor[ 2 ]) // b
- write_byte(500) // brightness
- message_end()
- set_pev(entity, pev_flTimeStepSound, NADE_TYPE_CAMPO)
- set_task(6.0, "DeleteEntityGrenade" ,entity)
- gBomb &= ~( 1 << ( owner % 32 ) )
- entity_set_model(entity, w_model)
- return FMRES_SUPERCEDE
- }
- }
- return FMRES_IGNORED
- }
- public DeleteEntityGrenade(entity)
- if( is_valid_ent( entity ) )
- 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 Float: Origin[3]
- entity_get_vector(id, EV_VEC_origin, Origin)
- entity_set_string(iEntity, EV_SZ_classname, entclas)
- entity_set_vector(iEntity,EV_VEC_origin, Origin)
- entity_set_model(iEntity,model)
- entity_set_int(iEntity, EV_INT_solid, SOLID_TRIGGER)
- entity_set_size(iEntity, Mins, Maxs )
- entity_set_int(iEntity, EV_INT_renderfx, kRenderFxGlowShell)
- entity_set_int(iEntity, EV_INT_rendermode, kRenderTransAlpha)
- entity_set_float(iEntity, EV_FL_renderamt, 50.0)
- #if defined RANDOM_COLOR
- if(is_valid_ent(iEntity))
- {
- new Float:vColor[3]
- for(new i; i < 3; i++)
- vColor[i] = random_float(0.0, 255.0)
- entity_set_vector(iEntity, EV_VEC_rendercolor, vColor)
- }
- #endif
- #if defined ONE_COLOR
- entity_set_vector(iEntity, EV_VEC_rendercolor, CampoColors)
- #endif
- #if defined CAMPO_TASK
- set_task(15.0, "DeleteEntity", iEntity)
- #endif
- return PLUGIN_CONTINUE;
- }
- public ze_user_infected(infected, infector)
- if ( gBomb & ( 1 << ( infected % 32 ) ) )
- gBomb &= ~( 1 << ( infected % 32 ) )
- public fw_touch(ent, touched)
- {
- if ( !pev_valid(ent) ) return FMRES_IGNORED;
- static entclass[32];
- pev(ent, pev_model, entclass, 31);
- if ( strcmp( entclass, model ) == 0 )
- {
- if( ValidTouch(touched) )
- {
- static Float:pos_ptr[3], Float:pos_ptd[3]
- pev(ent, pev_origin, pos_ptr)
- pev(touched, pev_origin, pos_ptd)
- for(new i = 0; i < 3; i++)
- {
- pos_ptd[i] -= pos_ptr[i]
- pos_ptd[i] *= Push
- }
- set_pev(touched, pev_velocity, pos_ptd)
- set_pev(touched, pev_impulse, pos_ptd)
- }
- }
- return FMRES_HANDLED
- }
- public DeleteEntity( entity ) // Thanks xPaw For The Code =D
- if( is_valid_ent( entity ) )
- remove_entity( entity );
- stock Color(const id, const input[], any:...)
- {
- static msg[191]
- vformat(msg, 190, input, 3)
- replace_all(msg, 190, "!g", "^4")
- replace_all(msg, 190, "!y", "^1")
- replace_all(msg, 190, "!t", "^3")
- message_begin(MSG_ONE_UNRELIABLE, g_SayText, _, id)
- write_byte(id)
- write_string(msg)
- message_end()
- }
- public shield_deploy( shield_ent )
- {
- if( pev_valid( shield_ent ) != 2 )
- return HAM_IGNORED;
- static const mPlayer = 41
- new id = get_pdata_cbase( shield_ent, mPlayer, 4 );
- if( ( gBomb & ( 1 << ( id % 32 ) ) ) && !ze_is_user_zombie( id ) )
- set_pev( id, pev_viewmodel2, model_grenade );
- return HAM_IGNORED;
- }
Last edited by johnnysins2000 7 years ago, edited 1 time in total.
Nobody Is That Busy If They Make Time
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
ok I compiled and uploaded. There is a shield in weapon menu but it doesnt work, no errors
-
- Veteran Member
- Posts: 678
- Joined: 7 years ago
- Location: Paraguay
- Contact:
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
-
- Veteran Member
- Posts: 678
- Joined: 7 years ago
- Location: Paraguay
- Contact:
OK bro i have updated the code try again to compile and test it again
Nobody Is That Busy If They Make Time
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
Still doesn't work I see this in weapon menu but nothing happens when I buy it
-
- Veteran Member
- Posts: 678
- Joined: 7 years ago
- Location: Paraguay
- Contact:
That's strange :/czirimbolo wrote: ↑7 years ago Still doesn't work I see this in weapon menu but nothing happens when I buy it
Maybe code bugged
Nobody Is That Busy If They Make Time
Plugin Available Here: http://escapers-zone.xyz/viewtopic.php?f=14&t=264. Locked.
He who fails to plan is planning to fail
Who is online
Users browsing this forum: No registered users and 0 guests