View Single Post
Re: cs weapons modification
Old
  (#16)
BotUser
Member
 
Status: Offline
Posts: 39
Join Date: Jun 2004
Default Re: cs weapons modification - 14-09-2005

Ok folks,

I think I almost made it. The HE grenades' strength in CS can now be adjusted at will.
Here's what I did:

- Intercepted "Damage" message to player entity
- checked pPlayer->v.dmg_inflictor for grenade entity
- if yes, then adjust pPlayer->v.health accordingly to do more damage
- send message to all other players about changed health

Don't do the last two steps if adjusting the health would result in
pPlayer->v.health <= 0.

And that's the problem. If, say, player health is 49, and health would be reduced by 50, I can't do it. I would have to let the player die.

How can one make a player die ? Is there something like pEntity->kill ?




  
Reply With Quote