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

Spawn Health + Timer


Post New Thread Reply   
 
Thread Tools Display Modes
awuh0
Senior Member
Join Date: Apr 2005
Location: /dev/null
Old 04-20-2006 , 00:29  
Reply With Quote #11

  • player_spawn.cfg
Quote:
if(server_var(eventscripts_currentmap) equalto "de_dust") then ma_sethealth event_var(userid) 10000
if(server_var(eventscripts_currentmap) equalto "de_dust") then es_delayed 10 ma_sethealth event_var(userid) 100
__________________
~The_wUh
_________________
Ph34r teh zombies!!!
find a better way to play CSS, connect to...
thewuh.servebeer.com
thecircus.servebeer.com
awuh0 is offline
Send a message via ICQ to awuh0 Send a message via AIM to awuh0 Send a message via MSN to awuh0
discombobulated
Junior Member
Join Date: Oct 2005
Old 04-20-2006 , 12:21  
Reply With Quote #12

Brilliant, thanks a lot
discombobulated is offline
TWeaKoR
New Member
Join Date: Jul 2007
Old 07-02-2007 , 16:34   Health change plugin for SourceMod?
Reply With Quote #13

Wahey I actually did find what I was looking for!!!

Hiya, my first post here so sorry if I sound like a lamer posting just to request one little plugin.

Me and my clan also play a lot of surf_japan_v2 on our server. Before we used Mani and a Spawn Protection script in eventscripts to set health to 2980 (looks like 420 from the player's perspective ) for 10 seconds at the start of the round. This used the ma_sethealth command.

Would it be possible to make a similar plugin to set health in SourceMod? With that I can change the command in the script to use a SourceMod health command, and I won't have to clutter up the server installing Mani as well.

Not asking someone to make the plugin, I'll even give it a go but I'm just not sure where to start XD

Cheers

Last edited by TWeaKoR; 07-02-2007 at 16:38. Reason: Too much rambling
TWeaKoR is offline
TSCDan
Senior Member
Join Date: Jan 2005
Location: NY, USA
Old 07-06-2007 , 14:26   Re: Spawn Health + Timer
Reply With Quote #14

You could just use the spawn protection module from the new CSSDM as far as I know.
TSCDan is offline
Send a message via AIM to TSCDan Send a message via MSN to TSCDan Send a message via Yahoo to TSCDan
Extreme_One
Veteran Member
Join Date: Nov 2006
Old 07-06-2007 , 15:24   Re: Health change plugin for SourceMod?
Reply With Quote #15

Quote:
Originally Posted by TWeaKoR View Post
Wahey I actually did find what I was looking for!!!

But you failed to read the replies to the orignal poster.

You can do this now with a simple EventScript.
Read the previous replies (carefully)

And I'm sure a SourceMod solution will come along shortly.
__________________
Extreme_One is offline
TWeaKoR
New Member
Join Date: Jul 2007
Old 07-06-2007 , 18:29   Re: Spawn Health + Timer
Reply With Quote #16

Cheers, but I've been aware and using a spawn protection script for a while. My main problem was that I wanted to stop using Mani, and the script I had used Mani commands to change health. I've now got the script changed to work wtih just eventscripts, but I'd still like to get a SourceMod version. Right now I'm back on using ES and Mani though, probably until SourceMod comes out of beta (and gets better docs!).
TWeaKoR is offline
deloveic
New Member
Join Date: Apr 2009
Old 04-11-2009 , 12:34   Re: Spawn Health + Timer
Reply With Quote #17

i was wondering if any 1 of u guys could tell me whay this spawn protection, wont turn off ??


// ******************************
// Sgt.Angel's Spawn Protection Mod
// for Counter-Strike: Source
// www.alastairq.co.uk/eventscripts
// ******************************
block load
{
// Enable Spawn Protection Mod?
// 1 = Enabled
// 0 = Disabled
es_setinfo spawnprotect_enable 1
// Spawn Protection Time
// Example: 10 = 10 Seconds
es_setinfo spawnprotect_spawntime 7
// Colour Change
// 1 = Change player colour when under Spawn Protection
// 0 = No colour change when under Spawn Protection
es_setinfo spawnprotect_colour 1
// Punish Spawn Attacker
// 0 = No Punishment
// 1 = Slay Attacker
es_setinfo spawnprotect_punish 0
// Announce Spawn Protection is Enabled/Disabled
// 1 = Enabled
// 0 = Disabled
es_setinfo spawnprotect_announce 1
// Announcement Method
// 1 = Broadcasts a text message in the chat area
// 2 = Broadcasts a text message in the centre of the screen
es_setinfo spawnprotect_announce_method 1
// Filter Maps
// 0 = Enable Spawn Protection for all maps
// 1 = Only enable Spawn Protection for maps with 'surf' found in the name
es_setinfo spawnprotect_filter 1
// Enable Warmup Timer
// 1 = Enables Warmup Timer at the start of a new map
// 0 = Disables Warmup Timer
es_setinfo spawnprotect_warmup 0
// Warmup Timer Time
// Example: 20 = 20 Seconds
es_setinfo spawnprotect_warmuptime 7
// DO NOT EDIT ANYTHING BELOW UNLESS YOU KNOW WHAT YOUR DOING
es_math spawnprotect_spawntime + server_var(mp_freezetime)
es_setinfo spawnprotect_roundstart 0
es_setinfo spawnprotect_player 0
es_setinfo spawnprotect_startprotection 1
es_doblock corelib/noisy_on
repeat create warmuptimer "es_xdoblock spawnprotect/warmup_msg"
repeat create spawnprotecttimer "es_xdoblock spawnprotect/stop"
es_makepublic spawnprotect_enable
es_msg #multi #green[Spawn Protect]#default Spawn Protection Mod is now enabled
}
block unload
{
es_doblock corelib/noisy_off
if(server_var(spawnprotect_roundstart) = 1) do
{
foreach player spawnprotect_player #all "es playerset health server_var(spawnprotect_player) 100"
foreach player spawnprotect_player #all "es playerset color server_var(spawnprotect_player) 255 255 255"
}
es_msg #multi #green[Spawn Protect]#default Spawn Protection Mod is now disabled
}
event es_map_start
{
if(server_var(spawnprotect_enable) = 1) do
{
if(server_var(spawnprotect_filter) = 1) do
{
if("surf" in event_var(mapname)) do
{
if(server_var(spawnprotect_warmup) = 1) do
{
es_doblock spawnprotect/warmup_start
}
else do
{
es_doblock spawnprotect/enable
}
}
else do
{
es_doblock spawnprotect/disable
}
}
else do
{
if(server_var(spawnprotect_warmup) = 1) do
{
es_doblock spawnprotect/warmup_start
}
else do
{
es_doblock spawnprotect/enable
}
}
}
else do
{
es_doblock spawnprotect/disable
}
}
block warmup_start
{
es_setinfo warmuptimer_time server_var(spawnprotect_warmuptime)
repeat start warmuptimer 1
}
block warmup_msg
{
es_centermsg server_var(warmuptimer_time) seconds left of warmup
es_xmath warmuptimer_time - 1
if(server_var(warmuptimer_time) = 0) do
{
es_doblock spawnprotect/warmup_end
}
}
block warmup_end
{
repeat delete warmuptimer
es_doblock spawnprotect/enable
}
block enable
{
es_setinfo spawnprotect_startprotection 1
mp_restartgame 1
}
block disable
{
es_setinfo spawnprotect_startprotection 0
}
event player_activate
{
if(server_var(spawnprotect_enable) = 1) do
{
if(server_var(spawnprotect_startprotection) = 1) do
{
es_tell event_var(userid) #multi #green[Spawn Protect]#default This server is enabled with Spawn
Protection Mod
es_tell event_var(userid) #multi #green[Spawn Protect]#default Made by Sgt.Angel
}
else do
{
es_tell event_var(userid) #multi #green[Spawn Protect]#default This server has Spawn Protection Mod
installed but is disabled because..
es_tell event_var(userid) #multi #green[Spawn Protect]#default 'surf' was not found in the mapname
es_tell event_var(userid) #multi #green[Spawn Protect]#default Made by Sgt.Angel
}
}
}
event round_start
{
if(server_var(spawnprotect_enable) = 1) do
{
if(server_var(spawnprotect_startprotection) = 1) do
{
foreach player spawnprotect_player #all "es playerset health server_var(spawnprotect_player) 800"
if(server_var(spawnprotect_colour) = 1) do
{
foreach player spawnprotect_player #all "es playerset color server_var(spawnprotect_player) 0 255 0"
}
es repeat start spawnprotecttimer server_var(spawnprotect_spawntime) 1
es_setinfo spawnprotect_roundstart 1
if(server_var(spawnprotect_announce) = 1) do
{
if(server_var(spawnprotect_announce_method) = 1) do
{
es_msg #multi #green[Spawn Protect]#default You are protected from spawn attacking!
}
else do
{
es_centermsg You are protected from spawn attacking!
}
}
}
}
}
event player_spawn
{
if(server_var(spawnprotect_enable) = 1) do
{
if(server_var(spawnprotect_roundstart) = 1) do
{
es playerset health event_var(userid) 500
if(server_var(spawnprotect_colour) = 1) do
{
es playerset color event_var(userid) 0 255 0
}
if(server_var(spawnprotect_announce) = 1) do
{
if(server_var(spawnprotect_announce_method) = 1) do
{
es_tell event_var(userid) #multi #green[Spawn Protect]#default You are protected from spawn
attacking!
}
else do
{
es_centermsg You are protected from spawn attacking!
}
}
}
}
}
event player_hurt
{
if(server_var(spawnprotect_roundstart) = 1) do
{
es playerset health event_var(userid) 800
if(server_var(spawnprotect_punish) = 1) do
{
es es_xsexec event_var(attacker) kill
es_msg #multi #green[Spawn Protect]#default event_var(es_attackername) was slayed for spawn attacking!
}
}
}
block stop
{
es_setinfo spawnprotect_roundstart 0
foreach player spawnprotect_player #all "es playerset health server_var(spawnprotect_player) 100"
if(server_var(spawnprotect_colour) = 1) do
{
foreach player spawnprotect_player #all "es playerset color server_var(spawnprotect_player) 255 255 0"
}
if(server_var(spawnprotect_announce) = 1) do
{
if(server_var(spawnprotect_announce_method) = 1) do
{
foreach player spawnprotect_player #all "es_tell server_var(spawnprotect_player) #multi #green[Spawn
Protect]#default You are no longer protected!"
}
else do
{
es_centermsg You are no longer protected!
}
}
}
deloveic 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 19:47.


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