playing a sound
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. |
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"); |
| All times are GMT -4. The time now is 14:25. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.