Raised This Month: $ Target: $400
 0% 

Double/Triple Kill with the same bullet


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sparkey
Senior Member
Join Date: May 2010
Old 08-06-2011 , 01:07   Re: Double/Triple Kill with the same bullet
Reply With Quote #1

Quote:
Originally Posted by Exolent[jNr] View Post
Use a global variable to count player kills.
Reset this variable when a player shoots a bullet.
Increase the variable when player kills another player.
Check variable for double kill.
That sounds like a wonderful and easy solution!

What function or event is called when a player shoots a bullet?

Thanks for your answer!
sparkey is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-06-2011 , 03:42   Re: Double/Triple Kill with the same bullet
Reply With Quote #2

Quote:
Originally Posted by sparkey View Post
That sounds like a wonderful and easy solution!

What function or event is called when a player shoots a bullet?

Thanks for your answer!
Look in Code Snippets/Tutorials for hooking gun fire events.


Quote:
Originally Posted by avril-lavigne View Post
you can check weapon
in event curWeapon
new weapon = get_user_weapon(id)
case CSW_DEAGLE : client_cmd(id,"say oops I have deagle")


some thing like that , also check buttons && IN_ATTACK
No.
You can do the same thing just a little different logic.
Code:
playerKilled = false
playerKillCounter = 0

- When player shoots
    if playerKilled = false
        playerKillCounter = 0
    else
        playerKilled = false

- When player kills
    playerKillCounter = playerKillCounter + 1
    playerKilled = true
    if playerKillCounter > 1
        print playerKillCounter
Easy.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 08-06-2011 at 03:46.
Exolent[jNr] 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 03:26.


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