Raised This Month: $ Target: $400
 0% 

playing a sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xdashx
New Member
Join Date: Sep 2005
Old 09-08-2005 , 06:56   playing a sound
Reply With Quote #1

Hi, im fairly new to amxx scripting and was wondering how you can check how many frags a player has and lets say they have killed 3 people in a row it will play a sound like Perfect! or something.

Ty.
xdashx is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 09-08-2005 , 15:13  
Reply With Quote #2

Just checking how many they have over all won't help you with how many in a row they have. The first thing you'll need is a variable to keep track of everyone's current killstreak.

Then you'll have to use the register_event function to hook the DeathMsg event, which is sent every time a player dies or is killed. read_data(1) should be the killer and read_data(2) should be the person that was killed. You should add one to the killer's killstreak and set the victim's killstreak back to 0.

Here is also where you would check if the killer's streak is now equal to 3, and if so use something like client_cmd(0,"spk misc/perfect.wav");
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 14:25.


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