引用 | 编辑
s091140
2014-08-04 15:27 |
楼主
▼ |
||
x0
当玩家碰到触手,就执行tentacle_dmg////// public fw_tentacle_touch(tentacle, id) { if(!pev_valid(tentacle)) return if(is_user_alive(id)) { tentacle_dmg(id) } } ///// 测试伤害功能的指令 register_clcmd("dmg", "tentacle_dmg") //////// 令玩家弹上天并扣血 public tentacle_dmg(id) { if(!is_user_connected(id)) return if(is_user_alive(id)) { static Float:Velocity[3] Velocity[0] = 1.0 Velocity[1] = 1.0 Velocity[2] = random_float(800.0, 1000.0) set_pev(id, pev_velocity, Velocity) } ExecuteHamB(Ham_TakeDamage, id, 0, id, 20.0, DMG_BULLET) } //////// 在测试时发现触手只会扣血,我不能弹上天 但输入指令后发现功能无缺 x0
|
引用 | 编辑
弑血
2014-08-04 15:42 |
1楼
▲ ▼ |
下面是引用 s091140 于 2014-08-04 15:27 发表的 [npc]很奇怪耶: public tentacle_dmg(id) { if(!is_user_connected(id)) return if(is_user_alive(id)) { static Float:Velocity[3] pev(id, pev_velocity, velocity) velocity[2] += random_float(800.0, 1000.0); set_pev(id, pev_velocity, Velocity) } } x0 |