引用 | 編輯
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 |