Raised This Month: $ Target: $400
 0% 

Air Strike (Update 1.1)


Post New Thread Reply   
 
Thread Tools Display Modes
jingojang
Senior Member
Join Date: Feb 2010
Location: The Moon
Old 12-28-2013 , 06:07   Re: Air Strike (Update 1.1)
Reply With Quote #11

Good job mate!
Add a video that demonstrates this plugin, please.
__________________

Last edited by jingojang; 12-28-2013 at 06:08.
jingojang is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 02-21-2014 , 21:13   Re: Air Strike (Update 1.1)
Reply With Quote #12

The code could really be shortened and improved. Are you still supporting this plugin?
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 03-07-2014 , 19:49   Re: Air Strike (Update 1.1)
Reply With Quote #13

User is non respondent to this thread, unapproved for now.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
xairgeo
Member
Join Date: Oct 2014
Old 10-27-2014 , 18:41   Re: Air Strike (Update 1.1)
Reply With Quote #14

Is there anyway you can make it so that when a player gets a certain amount of kills they automatically get a airstrike? Like a kill-streak from COD.
xairgeo is offline
nonameguy123
Junior Member
Join Date: May 2017
Location: Wakanda
Old 07-09-2017 , 02:17   Re: Air Strike (Update 1.1)
Reply With Quote #15

Gameplay please😃
nonameguy123 is offline
Old 08-22-2019, 11:26
veliflst
This message has been deleted by veliflst.
RainePlayz1
Junior Member
Join Date: Mar 2022
Old 09-23-2022 , 04:42   Re: Air Strike (Update 1.1)
Reply With Quote #16

For Zombie Plague

#include <amxmodx>
#include <fun>
#include <amxmisc>
#include <engine>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>
#include <zombieplague>

new PLUGIN[]="Addon: Air Strike"
new AUTHOR[]="Catastrophe"
new VERSION[]="1.1"


new bool:has_airstrike[33]
new spr_explode, cache_spr_line

new strike_dam, strike_mode, strike_radius, strike_cost, strike_timer
new g_item
const g_item_cost = 85

public plugin_init()
{


register_plugin(PLUGIN,VERSION,AUTHOR)
register_clcmd("+call", "call_strike")

strike_mode = register_cvar("airstrike_mode", "1")
strike_timer = register_cvar("airstrike_delay", "2.5")
strike_dam = register_cvar("airstrike_damage", "1000.0")
strike_radius = register_cvar("airstrike_radius", "500.0")
strike_cost = register_cvar("airstrike_cost", "8000")

g_item = zp_register_extra_item("Airstrike", 100, ZP_TEAM_HUMAN)

}


public plugin_precache()
{


precache_sound("ambience/siren.wav")
precache_sound("ambience/jetflyby1.wav")
precache_sound("weapons/airstrike_explosion.wav")
precache_model("models/rpgrocket.mdl")
spr_explode = precache_model("sprites/fexplo.spr")
cache_spr_line = precache_model("sprites/laserbeam.spr")


}


public client_connect(id)
{

has_airstrike[id] = false

}


public client_disconnect(id)
{

has_airstrike[id] = false

}

// Item Selected forward
public zp_extra_item_selected(player, itemid)
{
if (itemid == g_item)
{
has_airstrike[id] = true
client_print(player, print_chat, "[ZP] You have bought airstrike type 'bind c +call' in console. Then aim and press c to drop the missle")

}
}

public call_strike(id)
{

if(!has_airstrike[id] || get_user_weapon(id) != CSW_KNIFE)
return;


static Floatrigin[3]

fm_get_aim_origin(id, origin)

new bomb = create_entity("info_target")

entity_set_string(bomb, EV_SZ_classname, "Bomb") // set name
entity_set_edict(bomb, EV_ENT_owner, id) // set owner
entity_set_origin(bomb, origin) // start posistion

line(origin)

emit_sound(id,CHAN_AUTO, "ambience/siren.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)

has_airstrike[id] = false

set_task(get_pcvar_float(strike_timer), "stop_siren")
set_task(get_pcvar_float(strike_timer)+0.1, "jet_sound", id)
set_task(get_pcvar_float(strike_timer)+0.2, "make_bomb", id)
set_task(get_pcvar_float(strike_timer)+0.3, "removebomb", id)



}

public make_bomb(id)
{

new ent

ent = find_ent_by_class(-1,"Bomb")

static Floatrigin[3]
pev(ent, pev_origin, origin)

CRT_explosion(origin)
emit_sound(ent, CHAN_WEAPON, "weapons/mortarhit.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
emit_sound(ent, CHAN_VOICE, "weapons/mortarhit.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM);

for (new i = 1; i < get_maxplayers(); i++)
{

shake_screen(i)

if(is_user_alive(i) && entity_range(i, ent) <= get_pcvar_float(strike_radius) && cs_get_user_team(id) != cs_get_user_team(i))
{

if(get_pcvar_num(strike_mode) == 1)
{
ExecuteHam(Ham_TakeDamage, i, 0, id, get_pcvar_float(strike_dam), DMG_BULLET)
}

else

{
ExecuteHam(Ham_Killed, i, 0, id)

}


}

}


}

public stop_siren()
{


client_cmd(0,"stopsound") // stops sound on all clients



}

public jet_sound(id)
{


emit_sound(id,CHAN_AUTO, "ambience/jetflyby1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)



}

public removebomb(id)
{

new ent = find_ent_by_class(-1,"Bomb")
remove_entity(ent)



}

public line(const Floatrigin[3])
{
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, origin, 0)
write_byte(TE_BEAMPOINTS) // temp entity event
engfunc(EngFunc_WriteCoord, origin[0]) // x
engfunc(EngFunc_WriteCoord, origin[1]) // y
engfunc(EngFunc_WriteCoord, origin[2]) // z
engfunc(EngFunc_WriteCoord, origin[0]) // x axis
engfunc(EngFunc_WriteCoord, origin[1]) // y axis
engfunc(EngFunc_WriteCoord, origin[2]+36.0) // z axis
write_short(cache_spr_line) // sprite index
write_byte(0) // start frame
write_byte(0) // framerate
write_byte(60) // life in 0.1's
write_byte(15) // line width in 0.1's
write_byte(0) // noise amplitude in 0.01's
write_byte(0) // color: red
write_byte(200) // color: green
write_byte(0) // color: blue
write_byte(200) // brightness
write_byte(0) // scroll speed in 0.1's
message_end()

}

public CRT_explosion(const Floatrigin[3])
{

new vec1[3];
vec1[0] = floatround(origin[0]);
vec1[1] = floatround(origin[1]);
vec1[2] = floatround(origin[2]);


message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
write_byte( 3 )
write_coord(vec1[0])
write_coord(vec1[1])
write_coord(vec1[2] + 20)
write_short( spr_explode )
write_byte( 50 )
write_byte( 10 )
write_byte( 0 )
message_end()

message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
write_byte( 3 )
write_coord(vec1[0] + 250)
write_coord(vec1[1] + 250)
write_coord(vec1[2] + 20)
write_short( spr_explode )
write_byte( 50 )
write_byte( 10 )
write_byte( 0 )
message_end()

message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
write_byte( 3 )
write_coord(vec1[0] -250)
write_coord(vec1[1] -250)
write_coord(vec1[2] + 20)
write_short( spr_explode )
write_byte( 50 )
write_byte( 10 )
write_byte( 0 )
message_end()

message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
write_byte( 3 )
write_coord(vec1[0] +250)
write_coord(vec1[1])
write_coord(vec1[2] + 20)
write_short( spr_explode )
write_byte( 50 )
write_byte( 10 )
write_byte( 0 )
message_end()

message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
write_byte( 3 )
write_coord(vec1[0] -250)
write_coord(vec1[1])
write_coord(vec1[2] + 20)
write_short( spr_explode )
write_byte( 50 )
write_byte( 10 )
write_byte( 0 )
message_end()

message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
write_byte( 3 )
write_coord(vec1[0])
write_coord(vec1[1] +250)
write_coord(vec1[2] + 20)
write_short( spr_explode )
write_byte( 50 )
write_byte( 10 )
write_byte( 0 )
message_end()

message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
write_byte( 3 )
write_coord(vec1[0])
write_coord(vec1[1] - 250)
write_coord(vec1[2] + 20)
write_short( spr_explode )
write_byte( 50 )
write_byte( 10 )
write_byte( 0 )
message_end()

message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
write_byte( 3 )
write_coord(vec1[0] +250)
write_coord(vec1[1] -250)
write_coord(vec1[2] + 20)
write_short( spr_explode )
write_byte( 50 )
write_byte( 10 )
write_byte( 0 )
message_end()

message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
write_byte( 3 )
write_coord(vec1[0] -250)
write_coord(vec1[1] +250)
write_coord(vec1[2] + 20)
write_short( spr_explode )
write_byte( 50 )
write_byte( 10 )
write_byte( 0 )
message_end()

}

stock shake_screen(id)
{
message_begin(MSG_ONE, get_user_msgid("ScreenShake"),{0,0,0}, id)
write_short(255<< 14 ) //ammount
write_short(10 << 14) //lasts this long
write_short(255<< 14) //frequency
message_end()
}
RainePlayz1 is offline
Reply


Thread Tools
Display Modes

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 08:25.


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