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

Detect double kill


Post New Thread Reply   
 
Thread Tools Display Modes
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 05-29-2011 , 15:13   Re: Detect double kill
Reply With Quote #11

wow
3 years of amxx scripting and i never new that lol

i generally increment it then check it though so its never really been an issue for me =]
__________________
minimiller is offline
Send a message via MSN to minimiller
reinert
Veteran Member
Join Date: Feb 2007
Old 05-29-2011 , 16:55   Re: Detect double kill
Reply With Quote #12

One more question, how to detect Wall kill ? (a.k.a. wallbang)
reinert is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 05-29-2011 , 17:00   Re: Detect double kill
Reply With Quote #13

Quote:
Originally Posted by Bugsy View Post
You will get different results with each:

Var++ returns the value prior to incrementing, so the first time it'll be 0, second time 1.

++Var returns the value post-increment, first would be 1, second 2
Can you explain that so people with just basic english can understand xD?
__________________
I am out of order!
grimvh2 is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 05-29-2011 , 17:02   Re: Detect double kill
Reply With Quote #14

If Var++ then it first get's var and checks the if and only after that it add ++, if ++Var then it firstly adds ++ to Var then checks if condition. Got it ?
reinert is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-29-2011 , 17:12   Re: Detect double kill
Reply With Quote #15

If you check the variables value after the var++ or ++var there is no difference.

The difference is only experienced when checking the result of either. ie. if ( ++var == 5 )

Var++ = pre increment
++Var = post increment

Test for yourself to see the difference.
__________________
Bugsy is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-29-2011 , 18:48   Re: Detect double kill
Reply With Quote #16

Quote:
Originally Posted by reinert View Post
One more question, how to detect Wall kill ? (a.k.a. wallbang)
Search for traceline examples.
__________________

Last edited by Bugsy; 05-29-2011 at 19:09.
Bugsy is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 05-30-2011 , 03:13   Re: Detect double kill
Reply With Quote #17

isn't there easier way ? because it sounds really hard to do with traceline.

Will it work with ?

fm_is_ent_visible(killer, victim)

Last edited by reinert; 05-30-2011 at 03:18.
reinert is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 05-30-2011 , 05:03   Re: Detect double kill
Reply With Quote #18

Quote:
Originally Posted by reinert View Post
isn't there easier way ? because it sounds really hard to do with traceline.

Will it work with ?

fm_is_ent_visible(killer, victim)
kinda dumb if you ask me if i know some one ran behind a door... ima shoot the door and hope to get them lolz. (were not visble)
Doc-Holiday 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:53.


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