![]() |
Manually killing in cs...
I'm having trouble doing manual damage in cs.... if I remember correctly this code is enough to kill in half life but... it bugs out in cs....
pEntity->v.health = -1; pEntity->v.deadflag = DEAD_DEAD; pEntity->v.takedamage = DAMAGE_NO; what happens is, the player takes the idle model animation... err the one where it's hands are sort of up with no weapon.... it becomes nonsolid, there is no death animation... if you do this to yourself then the death cam turns on.... but there is never a message or score changing or anything like that. And also you can't respawn :-/ plz help. |
Re: Manually killing in cs...
I used ClientKill(or pfnClientKill) in my esf bots.
|
Re: Manually killing in cs...
true but, what I'm doing is trying to get a bot to do "manual" damage and get credit for it.... basically this is in a mod simmilar to wc3 and the bots have their own damages..... basically the bot shoots a temp entity towards player and when the enemy's health goes below 1 I want him to die and the bot who shot to get credit...
|
Re: Manually killing in cs...
Yeah, I made some damaging function too...a bit dodgy though:
Code:
void UTIL_DamagePlayer(edict_t *pKiller, edict_t *pVictim, const char *Weapon, float Damage) |
Re: Manually killing in cs...
...except that CBaseStuff won't work in Counter-Strike, ain't I right ?
If you have the source code of the mod you're writting this for, do what Rick says ; else I'd say it's pretty much impossible. |
Re: Manually killing in cs...
Pierre out of all the people :)
did you know that it's possible to add entities to cs? ;) CBaseEntity DOES exist in cs.... this line turns edict_t into a semi workable CBaseEntity... CBaseEntity *pEnt = (CBaseEntity *)GET_PRIVATE(pVictim); only difference is that you can't use any functions.... |
Re: Manually killing in cs...
grr sorry for second post so shortly but... TakeDamage don't work for meh :( I tried before... and I actually have my own entity in cs so dont need to make one... it crashes when I do TakeDamage.... maybe it's where I'm doing it :-/ hmm.
|
Re: Manually killing in cs...
Quote:
For the killing...sorry don't know any other way :-/ |
Re: Manually killing in cs...
I tried something like this a while ago but lost the source and forgot how until I remembered 20 minutes ago...
Code:
// Causes pain to someone by using a trigger_hurt to apply damage This should work with any mod that has trigger_hurt entities compiled in. |
Re: Manually killing in cs...
oh yeah, a trigger_hurt.. that's smart :)
and lol @ the canadian winter :D |
All times are GMT +2. The time now is 14:07. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.