|
发表于 2005-6-19 20:47:33
|
显示全部楼层
来自 中国–辽宁–沈阳
- /* AMX MOD Script
- * Author: Hydralisk
- * Date: 2005.6.19 20:33
- *
- */
- #include <amxmod>
- #include <amxmisc>
- new bool:p_ndmg[33]
- public plugin_init(){
- register_plugin("No Damage","0.1","Hydralisk")
- register_concmd("amx_nodmg","nodmg",ADMIN_SLAY," <player nick or #id>: make a player cannot damage others")
- register_event("ResetHUD","reset","b")
- return PLUGIN_CONTINUE
- }
- public mk_ndmg(id){
- new players[32],pnum
- get_players(players,pnum,"a")
- for (new i = 0; i<pnum; i++){
- set_user_hitzones(id,players[i],0)
- }
- }
- public reset(id){
- if (p_ndmg[id]) set_task(0.1,"mk_ndmg",id)
- return PLUGIN_CONTINUE
- }
- public nodmg(id,level,cid){
- if (!cmd_access(id,level,cid,2)) return PLUGIN_HANDLED
- new arg[33]
- read_argv(1,arg,32)
- new player = cmd_target(id,arg,3)
- if (!player) return PLUGIN_HANDLED
- p_ndmg[player] = !p_ndmg[player]
- if (p_ndmg[player]) mk_ndmg(player)
- return PLUGIN_HANDLED
- }
- public client_connect(id){
- p_ndmg[id] = false
- }
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|