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

[27/06/10] Block Slash


Post New Thread Reply   
 
Thread Tools Display Modes
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 06-27-2010 , 12:42   Re: [27/06/10] Block Slash
Reply With Quote #11

Instead of superceding everytime they try to slash, you could hook Item_Deploy and set the m_flNextPrimaryAttack to something like 99999.9.

EDIT: My USP Ninjas plugin has this (it's for SecondaryAttack, but the offset for primary is 1 less,) so feel free to look at that for an example.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Erdener
Senior Member
Join Date: Apr 2010
Location: Turkey
Old 06-27-2010 , 14:44   Re: [27/06/10] Block Slash
Reply With Quote #12

Good Job.
__________________
Erdener is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 06-27-2010 , 15:03   Re: [27/06/10] Block Slash
Reply With Quote #13

Very usefull!
Good job man
__________________
Retired.
Xalus is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 06-27-2010 , 18:30   Re: [27/06/10] Block Slash
Reply With Quote #14

Quote:
Originally Posted by xPaw View Post
You are hooking weapon_knife wich is cstrike specific

EDIT:
- You could exclude bots from the loop (look params for get_players)
- Create variable id and store [i]players[i] into it
1# Did (coming when I update) (not that there are knife servers with bots)
2# why?

edit : Version 3.0 Released.
__________________
I am out of order!

Last edited by grimvh2; 06-27-2010 at 19:17.
grimvh2 is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 06-28-2010 , 01:31   Re: [27/06/10] Block Slash
Reply With Quote #15

Quote:
Originally Posted by grimvh2 View Post
2# why?
memory
__________________
xPaw is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 06-28-2010 , 05:30   Re: [27/06/10] Block Slash
Reply With Quote #16

Quote:
Originally Posted by xPaw View Post
memory
just store players[i] into a new variable 'id' ? Does that really makes a difference?
__________________
I am out of order!
grimvh2 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-28-2010 , 10:18   Re: [27/06/10] Block Slash
Reply With Quote #17

Quote:
Originally Posted by grimvh2 View Post
just store players[i] into a new variable 'id' ? Does that really makes a difference?
http://wiki.alliedmods.net/Optimizin...e-index_Arrays
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 06-28-2010 , 14:18   Re: [27/06/10] Block Slash
Reply With Quote #18

Quote:
Originally Posted by YamiKaitou View Post
Good to know, then I will change it directly.
__________________
I am out of order!
grimvh2 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-01-2010 , 15:56   Re: [27/06/10] Block Slash
Reply With Quote #19

The code is acceptable however before approval, I would like you change some things :

- You can see some code in FwdPlayerKilled() and RoundStart are the same. Make a function with that.
- About your equal(szArg... ) ; instead of using equal() you could simply check the first and second character. So, first character to see if there is '@' then lower the second character, and make a switch to check the second character is enough. You get the idea.
__________________
Arkshine is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 11-01-2010 , 17:11   Re: [27/06/10] Block Slash
Reply With Quote #20

Done and updated.
__________________
I am out of order!
grimvh2 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 02:20.


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