EventScripts Forums
Mattie's EventScripts and Source Forums
Mattie recommends...
Premier Sponsor:Platinum Sponsor:
 
Script Categories
addon (49) admin (269) admins (14) advert (15) adverts (19) afk (15) alerts (12) ammo (23) anti (15) auth (16) automatic (12) awp (23) ban (18) ba_jail (17) bhop (19) block (19) bomb (40) bonus (23) bot (24) bot-management (19) bots (17) bunnyhop (11) Buy (21) cash (65) chat (57) cheat (11) clan (16) classes (22) color (21) colors (18) command (20) commands (18) config (22) connect (42) CS:S (16) css (2507) Damage (35) database (11) dead (15) death (19) deathmatch (70) deathrun (12) disconnect (18) Dissolve (11) dm (20) dod:s (11) dods (389) easy (17) effects (120) English (15) entity (21) es_tools (12) Eventscript (12) flashbang (25) français (99) french (36) fun (288) funny (16) Gabeee (11) gameplay (174) give (16) gravity (11) grenade (25) grenades (29) gun (14) GunGame (26) GunGame5 (11) guns (17) Hack (15) headshot (32) health (55) hegrenade (13) hl2dm (332) HP (13) info (48) information (16) jail (26) jailbreak (11) join (23) jump (12) kick (23) kill (44) kills (22) knife (57) leveling (36) management (14) mani (15) map (25) map-management (27) maps (15) match (17) menu (106) message (20) messaging (52) mod (109) model (14) models (32) money (42) motd (13) music (29) mute (18) nades (18) name (13) noblock (35) player (40) player-management (31) player-tracking (28) popup (56) props (23) protection (27) punishment (50) python (63) quake (18) radio (21) random (36) rank (35) rates (16) rcon (13) realism (21) respawn (61) restrict (36) round (20) rpg (24) rules (42) say (11) scout (19) Script (20) script-helper (25) scriptpack (33) sdk (151) server (44) server-tools (42) shop (12) silly (31) simple (27) skins (25) slay (13) soccer (11) sound (45) sounds (92) spawn (63) speed (25) statistics (13) stats (48) STEAMID (23) Superhero (13) surf (31) Team (25) team-balance (14) teleport (12) text (14) TF2 (143) time (17) timer (14) tools (15) tracers (17) triggers (11) uedi (18) uses_auth (18) utility (11) vip (12) vote (36) voting (22) war (20) wcs (24) wcs:Python (32) weapon (77) weapons (114) web (14) welcome (12) zm (24) zombie (90) zombiemod (51) zombies (11)
Script Authors
*XYZ*SaYnt (12) .:MiB:. (11) .eMko* (6) 101satoon101 (10) 3R10N (24) 4u571n91 (5) 7355608 (9) Absolute (8) Ace Rimmer (40) adminc (5) Adz (8) AgathaKnuppelkuh (8) aidden (8) ajax (5) ak_47 (6) Al3c Tr3v3lyan (6) allstareng (5) ashbash1987 (9) ATAMAH (7) aznone (5) B00M (5) BackRaw (41) BFH_RedBull (8) bigfabi (7) Bioko (7) Blade (10) bladesback (13) bobdole (11) bodzsar1 (8) bonbon (36) Brainsucker (30) cagemonkey (8) carbon-14 (10) CaskioUTF (5) cbirou (15) ChaCaLz2psy4 (5) CharlesT (5) Chrisber (5) chrismrulz (9) Chun (6) cladiron (10) clipz934 (8) Colster (21) Cookieman8 (7) craziest (10) DanielB (19) Darkness123 (8) Dave (9) dbozan99 (7) deathx9 (5) Deathyy (16) dhack (16) Di[M]aN (12) DoCky (27) Don (15) dordtcore (8) DragonFreddo (8) Drassil (5) Einlanzers (42) EmbouT (10) emilplov (7) Errant (10) Eun (6) Fantole (9) Franc1sco (9) freddukes (18) Frequency (6) Fulmine (5) GAMEREN2 (8) german9114 (13) GODJonez (38) GoodfellaDeal (5) Hansi (6) HitThePipe (7) HOLLDIDAY (9) Icetouch (6) ichthys (25) infamous1 (9) Jeff91 (45) JoeyT2006 (30) Juba_PornBorn (12) jxl180 (10) KDBFame (6) L'In20Cible (7) Largo Usagi (10) Lobe (11) loKkdoKk (7) lolo-le-haricot (7) LosNir (5) Lumpi@Work (9) M4rc3L-XCN (7) macshot (6) Matth (6) Mattie (20) MBchrono (15) McFly (20) Medda (5) Memphis-84 (10) Messiah93 (12) Mickyy (5) micmacx (6) Mitchell (5) Mordavolt (7) MrScriptaz (5) mryoung (6) Nicolous (26) ojii (31) Omega_K2 (8) Owned|Myself (8) P3N (7) pand3mic (5) parsimba (5) Pascal257 (9) PatPeter (7) PDrop (10) Phaedrus (18) PhantOm Fury (7) phoenix131 (9) pinkyyy -.- (5) pitbull0993 (7) randomknifer (9) Ratzee (6) ReaCtioN2oo9 (6) Rennnyyy (17) revolutionfighters (6) RideGuy (12) Rio (9) Roeliekt (6) runamagic (13) sandking220 (6) Sarcasm_Poisoning (10) saRs| Johnny-5 (13) Schubaal (10) sea212 (5) sega74rus (7) sgt.angel (6) sicilia (5) sicman_adrian (22) skillz92 (7) sn4k3 (18) snake38 (10) sonicsight (7) spoonman184 (8) stabby (22) stas (22) Strontium Dog (30) SumGuy14 (25) SuperDave (45) surfteam (5) TaCo (5) TanaToS (17) Tealk (6) teowow (16) TheCheeTaH (20) TheDonFather (5) theresthatguy (6) Tiny Tod (7) Totyahun (9) uedi (38) Undead (25) usernamesaretaken (15) Warren (13) westham (6) WhiteAvenger (7) Wonder (14) X-Mania (5) XE_ManUp (13) xfalcon61 (5) zSweetXz (5) [Cs]Lord_Inferno2 (11) [NATO]Hunter (28) ||Wolf|| (10)
Search

Post new topic Reply to topic
Author Message
User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 3479
Location:
Calgary, Waterloo, Ottawa
 
New postPosted: 2006-06-21, 6:58 am 
   Post subject: [1.0+] Headshot Streak!

Headshot Streak!
    This script counts the number of headshots players get in a row. Once they reach set amounts a message is displayed.
Config
    The config is in the script. Only contains one var:
    hs_announce. Set this to when you want headshot streaks to be announced.
      Example:
      hs_announce ,5,7,9,11,15,
      //This will announce when a player gets 5,7,9,11 and 15 headshots in a row. The ,'s are important and must be before and after each number.
    There is also the announce block that can be edited
    Code:
    block announce
    {
       //This block is what is called when a player has (hs_announce) headshots in a row
       //variables: hs_count
       //events vars: attacker, es_attackerusername
       es_xsetinfo hs_message 0
       es_format hs_message "%1: %2 headshot streak!" event_var(es_attackername) server_var(hs_count)
       es_centermsg server_var(hs_message)
       es_msg #green server_var(hs_message)
    }
Install
    Extract contents of archive to your cstrike folder. There should be one file in
    cstrike/addons/eventscripts/hs_count/es_hs_count.txt
    Then run the command es_load hs_count
    To make it load automatically when you start your server add the line to your autoexec.cfg
Code:
//Eventscripts 1.0+ remake of HS_Count
//by ichthys

block config
{
   hs_announce ,5,7,9,10, //When to announce headshot streak 5 in row, 7 in a row, 9 in a row...etc
}

block announce
{
   //This block is what is called when a player has (hs_announce) headshots in a row
   //variables: hs_count
   //events vars: attacker, es_attackerusername
   es_xsetinfo hs_message 0
   es_format hs_message "%1: %2 headshot streak!" event_var(es_attackername) server_var(hs_count)
   es_centermsg server_var(hs_message)
   es_msg #green server_var(hs_message)
}

block load
{
   es_xsetinfo hs_version 2.1
   es_xmakepublic hs_version
   es_xsetinfo hs_announce 0
   es_xsetinfo hs_count 0
   es_xsetinfo hs_format 0
   es_xdoblock hs_count/config
   es_xcreateplayerlist hs_count
   es_foreachkey key in hs_count "es_keysetvalue hs_count server_var(key) count 0"
}

block unload
{
   es_xkeygroupdelete hs_count
}
block enable
{
   es_xkeygroupdelete hs_count
   es_xcreateplayerlist hs_count
   es_foreachkey key in hs_count "es_keysetvalue hs_count server_var(key) count 0"
}

block disable
{
   es_xkeygroupdelete hs_count
}

event player_activate
{
   es_xkeygroupcreate hs_count
   es_keycreate hs_count event_var(userid)
   es_keysetvalue hs_count event_var(userid) count 0
}

event player_disconnect
{
   es_keydelete hs_count event_var(userid)
}

event player_death
{
   if (event_var(headshot) = 1) do
   {
      es_keygetvalue hs_count hs_count event_var(attacker) count
      es_xmath hs_count + 1
      es_keysetvalue hs_count event_var(attacker) count server_var(hs_count)
      es_format hs_format ,%1, server_var(hs_count)
      if (server_var(hs_format) in server_var(hs_announce)) then es_xdoblock hs_count/announce;
   }
   if (event_var(headshot) = 0) then es_xkeysetvalue hs_count event_var(attacker) count 0
   es_keysetvalue hs_count event_var(userid) count 0
}

_________________
Image
Image


Last edited by ichthys on 2006-06-21, 2:22 pm, edited 2 times in total.




User avatar
New User
Profile

Posts: 17
 
New postPosted: 2006-06-21, 7:12 am 

Is there anything else this scipt does besides what the older one does?


User avatar
Experienced
Profile

Posts: 423
 
New postPosted: 2006-06-21, 8:44 am 

thx a loooot!

_________________
afk


User avatar
Newbie
Profile

Posts: 55
 
New postPosted: 2006-06-21, 9:42 am 

darkness1095 wrote:
Is there anything else this scipt does besides what the older one does?



There are some efficiency things/internal changes but functionality wise it seems like the only thing new if that you can now set at what numbers you want want the server to display the message. The old version(at least the version I was running) only had a minimum.

_________________
Image


User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 3479
Location:
Calgary, Waterloo, Ottawa
 
New postPosted: 2006-06-21, 12:41 pm 

darkness1095 wrote:
Is there anything else this scipt does besides what the older one does?


Not really. Besideds what decaprime said.

I am working on a new script that keeps server records. I realised people might want just a simple count like before so I whipped this up.

_________________
Image
Image


User avatar
New User
Profile

Posts: 17
 
New postPosted: 2006-06-21, 1:13 pm 

For some reason when i get a headshot streak this appears in the middle of my screen,

"ƒadeD G|ory Clan | Darkness™: server_var(hs_count) headshot streak!"ƒadeD G|ory Clan | Darkness™: server_var(hs_count) headshot streak!

I think theres a typo somewhere in the script. :evil:
Do you think you could check it out? :roll:


Last edited by darkness1095 on 2006-06-21, 2:30 pm, edited 1 time in total.

User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 3479
Location:
Calgary, Waterloo, Ottawa
 
New postPosted: 2006-06-21, 2:19 pm 

darkness1095 wrote:
For some reason when i get a headshot streak this appears in the middle of my screen,

"ƒadeD G|ory Clan | Darkness™: server_var(hs_count) headshot streak!"Darkness™: server_var(hs_count) headshot streak!

I think theres a typo somewhere in the script. :evil:
Do you think you could check it out? :roll:


er yup. lol fixing now. Grrr. just wait till css finishes downloading. Im in CHina and dont have css yet. :(

edit: Sould be fixed now. Thank you very much for the feedback.

_________________
Image
Image


User avatar
New User
Profile

Posts: 17
 
New postPosted: 2006-06-21, 2:27 pm 

Lol, no problem :P


User avatar
New User
Profile

Posts: 9
 
New postPosted: 2006-06-23, 1:09 am 

Is there any way to play a sound when they get 5 hs in a row?

btw ichthys, your scripts kick ass.


User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 3479
Location:
Calgary, Waterloo, Ottawa
 
New postPosted: 2006-06-23, 2:56 am 

JustinSane wrote:
Is there any way to play a sound when they get 5 hs in a row?

btw ichthys, your scripts kick ass.


You can change block announce to do whatever you want.
Code:
if (server_var(hs_count) = 5) then ma_play blahblah


block announce will run whenever a player gets hs_announce headshots so you'll need to have 5 in there. Or you could add the line to where hs_announce is checked.

_________________
Image
Image


User avatar
New User
Profile

Posts: 14
 
New postPosted: 2006-07-21, 4:17 pm 

I try to add the code to play a sound when getting 5 headshots.

Code:
block announce
{
   //This block is what is called when a player has (hs_announce) headshots in a row
   //variables: hs_count
   //events vars: attacker, es_attackerusername
   es_xsetinfo hs_message 1
   es_format hs_message "%1: %2 headshot streak!" event_var(es_attackername) server_var(hs_count)
   es_centermsg server_var(hs_message)
   es_msg #green server_var(hs_message)
   if (server_var(hs_count) = 5) then ma_play "bot/owned.wav"
}


Do I need to add the sound file anywhere else or make something to 1 for enable?


User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 3479
Location:
Calgary, Waterloo, Ottawa
 
New postPosted: 2006-07-26, 3:16 am 

That looks like a standard css sound. Are you sure you got the location right? Does it play when you just run ma_play bot/owned.wav?
Also you don't need the quotes but I think it should still work.

_________________
Image
Image


User avatar
 
New postPosted: 2006-07-27, 7:25 am 

If someone had Quake Sounds and this, ohh man that would be annoying. :shock: :shock:


User avatar
Experienced
Profile

Posts: 362
Location:
SWEDEN
 
New postPosted: 2006-09-12, 12:31 pm 

Saturnsix wrote:
I try to add the code to play a sound when getting 5 headshots.

Code:
block announce
{
   //This block is what is called when a player has (hs_announce) headshots in a row
   //variables: hs_count
   //events vars: attacker, es_attackerusername
   es_xsetinfo hs_message 1
   es_format hs_message "%1: %2 headshot streak!" event_var(es_attackername) server_var(hs_count)
   es_centermsg server_var(hs_message)
   es_msg #green server_var(hs_message)
   if (server_var(hs_count) = 5) then ma_play "bot/owned.wav"
}


Do I need to add the sound file anywhere else or make something to 1 for enable?

I would use this as last line there:
Code:
if (server_var(hs_count) equalto 5) then es_cexec event_var(userid) playgamesound bot/owned.wav

And yes, that sound exists.

_________________
Image
Image
Visit our CSS server by joining from here: http://tkh.50webs.com
Check out my script "TheOneAndOnly" *UPDATED February 17*

Find prime numbers with SRCDS!

User avatar
Guru
Guru
Profile

Posts: 1633
Location:
feeding my rabbit
 
New postPosted: 2006-11-07, 6:45 pm 

*passes out backwards onto head causing 4 month concussion, later waking up to come back and download*

_________________
.:Random Knifer


User avatar
Newbie
Profile

Posts: 55
 
New postPosted: 2006-12-27, 4:12 pm 
   Post subject: Thank You

...

_________________
www.gauntletcss.com


Last edited by John Galt on 2008-08-18, 12:11 am, edited 1 time in total.

User avatar
New User
Profile

Posts: 11
 
New postPosted: 2007-01-14, 10:17 pm 

Curious to see if anyone has ever got this to play a sound via the block announce as mentioned.

ichthys wrote:
That looks like a standard css sound. Are you sure you got the location right? Does it play when you just run ma_play bot/owned.wav? Also you don't need the quotes but I think it should still work.


To answer this question above.. ma_play bot/owned.wav isn't found by mani though it is actually there "sound/bot/owned.wav". From console ma_play hello works though thats playing an alias of mani located in cstrike\sound\admin_plugin\hellosoft.wav

I've tried various things and just can't seem to play a sound based on an event. frelle218 mentions using playgamesound so at the least I'd expect to see an error in the client console because of valves block on cl_restrict_server_commands.

Console: works
Code:
play bot/owned.wav


Tried: doesn't work
Code:
if (server_var(hs_count) = 5) then play bot/owned.wav


Anyone have a working edit?


User avatar
New User
Profile

Posts: 7
 
New postPosted: 2007-04-08, 3:33 pm 

Chaotic Llama wrote:
Anyone have a working edit?


yes, i have. took a bit of playing around to do, i don't really know eventscripts too well.

Code:
block announce
{
   //This block is what is called when a player has (hs_announce) headshots in a row
   //variables: hs_count
   //events vars: attacker, es_attackerusername
   es_xsetinfo hs_message 0
   es_format hs_message "%1: %2 headshot streak!" event_var(es_attackername) server_var(hs_count)
   es_centermsg server_var(hs_message)
   es_msg #green server_var(hs_message)
   es_emitsound player server_var(hs_count) admin_plugin/hurricane.mp3 1.0 1.0
}


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group