搜索
查看: 1698|回复: 1

T 的1.5 双手MP5枪插件

[复制链接]
发表于 2007-9-23 23:36:39 | 显示全部楼层 |阅读模式 来自 中国–广东–广州–白云区
1)下载+解压
2)把SteamTools_Net_DualMP5.放在\cstrike\models
3)把"amx_dualmp5.amxx"放在\cstrike\addons\amxmodx\plugins
4)在\cstrike\addons\amxmodx\configs\plugins.ini"最底打 amx_dualmp5.amxx 保存
5)这是源码amx_dualmp5.sma.......

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
 楼主| 发表于 2007-9-23 23:38:08 | 显示全部楼层 来自 中国–广东–广州–白云区

回复: T 的1.5 双手MP5枪插件

new plrHealth = get_user_health(id)
new plrNewDmg
//
// plrDmg is set to how much damage was done to the victim
// plrHealth is set to how much health the victim has
// plrAttacker is set to the id of the person doing the shooting
//
// Could have put the above on one line, didn't for learning purposes (nubs may read this!) lol
// Example: new plrWeap, plrPartHit, plrAttacker = get_user_attacker( .. etc etc
//
if (plrWeap != CSW_MP5NAVY){
     // If the damage was not done with an MP5, just exit function..
  return PLUGIN_CONTINUE
}
if (is_user_alive(id)){
     // If the victim is still alive.. (should be)
  plrNewDmg = (plrHealth - plrDmg)
  //
  // Make the new damage their current health - plrDmg..
  // This is actually damage 2x, becuase when they did the damage
  // lets say it was 10, now this is subtracting 10 from current heatlh
  // doing 20, so thats 2 times =D
  //
  if(plrNewDmg < 1){
   // If the new damage will kill the player..
   set_msg_block(get_user_msgid("DeathMsg"),BLOCK_ONCE);
   // Block one the death messages to prevent 'suicide'
   message_begin(MSG_ALL, get_user_msgid("DeathMsg"), {0,0,0}, 0)
   // Start a death message, so it doesnt just say "Player Died",
   // the killer will get the credit
   
   write_byte(plrAttacker)
   // Write KILLER ID
   
   write_byte(id)
   // Write VICTIM ID
            
   write_byte(random_num(0,1))
   // Write HEAD SHOT or not
   // I made this random because I was unsure of how to detect
   // if plrPartHit was "head" or not.. someone help..
   
   write_string("mp5navy")
   // Write the weapon VICTIM ID was killed with..
   
   message_end()
   // End the message..
  }
  set_user_health(id, plrNewDmg)
  // Then set the health, even if it will kill the player
}
return PLUGIN_CONTINUE
}
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表