Raised This Month: $51 Target: $400
 12% 

set health (vancelorgin?)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 04-04-2005 , 13:18   set health (vancelorgin?)
Reply With Quote #1

I had a question which Beetlefart suggested I post here.

Quote:
I recently made a map de_soccer1. It was basically just a diversion from my main map that took me 6-8 hours to play with a new set of objectives for a CS:S map.

I intended it to be played like a regular CS:S map, either complete the objectives or kill the other team, but I have a lot of people asking if there is a way to stop people from shooting each other so they have to score a goal to win the round.

I'm no stranger to coding, although I've only done one basic server plugin for HL2. Before tackling this I thought I'd ask the experts.

With the way the server plugin system is setup, can you check the health of a player when they are shot and prevent them from dieing? Maybe set their health to 1000 when they are shot but before the health is changed by the shot and then change it back to 100 after the shot has been recognized by the regular game code?

Thanks for any help!

L. Duke
Beetlefart answered:
Quote:
the player_hurt event is what is triggered when someone is hurt ..
the damage is already been done..

I would probably post on the sourcemod.net forums in the coding section

vancelorgin might know how you can hook into it before the damage is done..
Thanks!
L. Duke is offline
theqizmo
Member
Join Date: Oct 2004
Old 04-04-2005 , 14:45  
Reply With Quote #2

Although I may be wrong, (lance is right, 99.99% of the time, so wait until he replies) you just need to hook the func that changes the health of the player, and make sure the original func gets bypassed when you want it.

I don't have time at the moment to go tracing down for the original func (if it's even possible, most likely it is possible), but this may help you get in the right direction.
theqizmo is offline
Send a message via ICQ to theqizmo Send a message via AIM to theqizmo Send a message via MSN to theqizmo
vancelorgin
Senior Member
Join Date: Dec 2004
Location: san frandisco
Old 04-05-2005 , 06:20  
Reply With Quote #3

Hooking traceattack and blocking everything would work - in fact it's done for you by fysh in nemoD - nm_hitboxes or something - setting it to nothing should block everything
__________________
Avoid like the plague.
vancelorgin is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:18.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode