Raised This Month: $ Target: $400
 0% 

Kill Bonus


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
allenwr
Veteran Member
Join Date: Jan 2006
Location: The place where the karm
Old 12-28-2006 , 19:23   Kill Bonus
Reply With Quote #1

Basically, I am looking for advise an ideas and areas where I can improve what I have done.

This plugin still has a lot of changes to be done to it. So don't say its going to make you cry or anything stupid.

PHP Code:
//Thanks to Johny Got His Gun - Drop all weapons code
//Copy Left Allenwr
//Headshot = +20Hp
//knife  = +50Ap - deagle - lower gravity
//knifeheadshot = +60Hp & +75Ap & 5/8s gravity
//grenade = Receive your victims prim + sec weapons and ammo
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <csx>
#include <fun>
new screen_fade
#define NUMOFITEMS 31
#define NUMOFAMMO 12
new const WEAPONSTRINGS[NUMOFITEMS][] = {
 
"",    // 0 First should be empty
 
"weapon_p228",
 
"weapon_shield",
 
"weapon_scout",
 
"",    // 4 HE CSW_HEGRENADE
 
"weapon_xm1014",
 
"",    // 6 C4 CSW_C4
 
"weapon_mac10",
 
"weapon_aug",
 
"",    // 9 smoke CSW_SMOKEGRENADE
 
"weapon_elite",
 
"weapon_fiveseven",
 
"weapon_ump45",
 
"weapon_sg550",
 
"weapon_galil",   
 
"weapon_famas",   
 
"weapon_usp",
 
"weapon_glock18",
 
"weapon_awp",
 
"weapon_mp5navy",
 
"weapon_m249",
 
"weapon_m3",
 
"weapon_m4a1",
 
"weapon_tmp",
 
"weapon_g3sg1",
 
"",    // 25 flash CSW_FLASHBANG
 
"weapon_deagle",
 
"weapon_sg552",
 
"weapon_ak47",
 
"",    // 29 knife CSW_KNIFE
 
"weapon_p90"
}
public 
plugin_init() {
 
register_plugin("Kill Bonus""0.9e""Allenwr")
 
register_event("HLTV""new_round""a""1=0""2=0")
 
screen_fade=get_user_msgid("ScreenFade")
}
public 
client_death(killervictimwpnindexhitplacetk) {
 
 new 
headshot = (hitplace == HIT_HEAD)?1:0
 
new suicide = (killer == victim)?1:0
 
 
new CsArmorType:ArmorType
 
 
new weapons[32]
 new 
weaponslistiammo
 
 
if(wpnindex == CSW_C4) {
  return
 }
 if(
is_user_alive(killer) && !suicide && !tk) {
  if(
wpnindex == CSW_KNIFE && !headshot) {
   if(
cs_get_user_armor(killerArmorType) <= 200) {
    if(!
user_has_weapon(killer,CSW_DEAGLE)) {
     
give_item(killer"weapon_deagle")
     
give_item(killer"ammo_50ae")
     
give_item(killer"ammo_50ae")
     
give_item(killer"ammo_50ae")
     
give_item(killer"ammo_50ae")
     
give_item(killer"ammo_50ae")
    }
    else {
     if(
get_user_gravity(killer) <= 0.5) {
      
set_user_gravity(killerget_user_gravity(killer) - 0.1)
     }
    }
   }
   else {
    
cs_set_user_armor(killercs_get_user_armor(killerArmorType) + 50CS_ARMOR_VESTHELM)
   }
   
set_task(0.1,"knife_flash",killer)
  }
 }
 if(
headshot && wpnindex != CSW_KNIFE) {
  
set_user_health(killerget_user_health(killer) + 20)
  
set_task(0.1,"headshot_flash",killer)
 }
 if(
wpnindex == CSW_KNIFE && headshot) {
  
set_user_health(killerget_user_health(killer) + 60)
  
cs_set_user_armor(killercs_get_user_armor(killerArmorType)+ 75CS_ARMOR_VESTHELM)
  
set_user_gravity(killer0.5)
  
set_task(0.1,"knifehead_flash",killer)
 }
 if(
wpnindex == CSW_HEGRENADE) {
  
get_user_weapons(victimweaponsweaponslist)
  for(
0<weaponslisti++) {
   if(
weapons[i] != CSW_KNIFE CSW_HEGRENADE CSW_FLASHBANG CSW_SMOKEGRENADE CSW_C4) {
    
ammo cs_get_user_bpammo(victimweapons[i])
    
strip_user_weapons(victim)
    
give_item(killerWEAPONSTRINGS[weapons[i]])
    
cs_set_user_bpammo(killerweapons[i], ammo)
   }
  }
  
set_task(0.1,"nade_flash",killer)
 }
}
public 
new_round(id)
 
set_user_gravity(id1.0)
public 
bomb_planted(planter) {
 new 
id planter
 
 
if(is_user_alive(id)) {
  
give_item(id,"ammo_556natobox")
  
give_item(id,"ammo_556natobox")
  
give_item(id,"ammo_556natobox")
  
give_item(id,"ammo_556natobox")
  
give_item(id,"ammo_556natobox")
  
give_item(id,"ammo_556natobox")
  
give_item(id,"ammo_556natobox")
  
give_item(id,"ammo_556nato")
  
give_item(id,"ammo_556nato")
  
give_item(id,"ammo_556nato")
  
give_item(id,"ammo_556nato")
  
give_item(id,"ammo_338magnum")
  
give_item(id,"ammo_338magnum")
  
give_item(id,"ammo_338magnum")
  
give_item(id,"ammo_762nato")
  
give_item(id,"ammo_762nato")
  
give_item(id,"ammo_762nato")
  
give_item(id,"ammo_762nato")
  
give_item(id,"ammo_762nato")
  
give_item(id,"ammo_762nato")
  
give_item(id,"ammo_45acp")
  
give_item(id,"ammo_45acp")
  
give_item(id,"ammo_45acp")
  
give_item(id,"ammo_45acp")
  
give_item(id,"ammo_45acp")
  
give_item(id,"ammo_45acp")
  
give_item(id,"ammo_57mm")
  
give_item(id,"ammo_57mm")
  
give_item(id,"ammo_57mm")
  
give_item(id,"ammo_57mm")
  
give_item(id,"ammo_9mm")
  
give_item(id,"ammo_9mm")
  
give_item(id,"ammo_9mm")
  
give_item(id,"ammo_9mm")
  
give_item(id,"ammo_buckshot")
  
give_item(id,"ammo_buckshot")
  
give_item(id,"ammo_buckshot")
  
give_item(id,"ammo_buckshot")
  
give_item(id,"ammo_57mm")
  
give_item(id,"ammo_57mm")
  
give_item(id,"ammo_57mm")
  
give_item(id,"ammo_57mm")
  
give_item(id,"ammo_357sig")
  
give_item(id,"ammo_357sig")
  
give_item(id,"ammo_357sig")
  
give_item(id,"ammo_357sig")
  
give_item(id,"ammo_357sig")
  
give_item(id,"ammo_357sig")
  
give_item(id,"ammo_50ae")
  
give_item(id,"ammo_50ae")
  
give_item(id,"ammo_50ae")
  
give_item(id,"ammo_50ae")
  
give_item(id,"ammo_50ae")
  
give_item(id,"ammo_50ae")
  
give_item(id,"ammo_50ae")
  
give_item(id,"ammo_9mm")
  
give_item(id,"ammo_9mm")
  
give_item(id,"ammo_9mm")
  
give_item(id,"ammo_9mm")
  
give_item(id,"ammo_9mm")
  
give_item(id,"ammo_9mm")
  
give_item(id,"ammo_9mm")
  
give_item(id,"ammo_9mm")
  
give_item(id,"ammo_45acp")
  
give_item(id,"ammo_45acp")
  
give_item(id,"ammo_45acp")
  
give_item(id,"ammo_45acp")
  
give_item(id,"ammo_45acp")
  
give_item(id,"ammo_45acp")
  
give_item(id,"ammo_45acp")
  
give_item(id,"ammo_45acp")
 }
 
set_task(0.1"bomb_flash"id)
}
public 
bomb_defused(defuser) {
 new 
id defuser
 
 
if(is_user_alive(id)) {
  
give_item(id,"weapon_hegrenade")
  
set_task(0.1"bomb_flash",id)
 }
 
set_task(0.1"bomb_flash"id)
}
public 
bomb_explode(planterdefuser) {
 new 
id planter
 
 
if(is_user_alive(id)) {
  
give_item(id,"weapon_hegrenade")
  
set_task(0.1"bomb_flash",id)
 }
 
set_task(0.1"bomb_flash"id)
}
public 
knife_flash(killer) {
 
message_begin(MSG_ONE,screen_fade,{0,0,0},killer);
 
write_short(2000// duration
 
write_short(2000// hold time
 
write_short(0// flags
 
write_byte(200// red
 
write_byte(200// green
 
write_byte(0// blue
 
write_byte(75// alpha
 
message_end()
}
public 
bomb_flash(id) {
 
message_begin(MSG_ONE,screen_fade,{0,0,0},id);
 
write_short(2000// duration
 
write_short(2000// hold time
 
write_short(0// flags
 
write_byte(125// red
 
write_byte(75// green
 
write_byte(0// blue
 
write_byte(75// alpha
 
message_end()
}
public 
nade_flash(killer) {
 
message_begin(MSG_ONE,screen_fade,{0,0,0},killer);
 
write_short(2000// duration
 
write_short(2000// hold time
 
write_short(0// flags
 
write_byte(200// red
 
write_byte(0// green
 
write_byte(200// blue
 
write_byte(75// alpha
 
message_end()
}
 
public 
headshot_flash(killer) {
 
message_begin(MSG_ONE,screen_fade,{0,0,0},killer);
 
write_short(2000// duration
 
write_short(2000// hold time
 
write_short(0// flags
 
write_byte(0// red
 
write_byte(0// green
 
write_byte(200// blue
 
write_byte(75// alpha
 
message_end()
}
public 
knifehead_flash(killer) {
 
message_begin(MSG_ONE,screen_fade,{0,0,0},killer);
 
write_short(2000// duration
 
write_short(2000// hold time
 
write_short(0// flags
 
write_byte(0// red
 
write_byte(200// green
 
write_byte(0// blue
 
write_byte(75// alpha
 
message_end()

__________________
Don't ever place an order with Vee Servers. This is why.

Last edited by allenwr; 12-28-2006 at 20:19. Reason: Title Edit
allenwr is offline
Send a message via ICQ to allenwr Send a message via Yahoo to allenwr
allenwr
Veteran Member
Join Date: Jan 2006
Location: The place where the karm
Old 12-28-2006 , 19:40   Re: A plugin I have spent time on.
Reply With Quote #2

Also, Im planning to add some fx, messages, HUDS, and a MOTD
__________________
Don't ever place an order with Vee Servers. This is why.
allenwr is offline
Send a message via ICQ to allenwr Send a message via Yahoo to allenwr
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 22:20.


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