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

Kill assist (for CS)


Post New Thread Reply   
 
Thread Tools Display Modes
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 04-30-2009 , 08:52   Re: Kill assist
Reply With Quote #11

lol nice idea.

+ dnGwy15RdUOtM:http://www.dining-out.co.za/ftp/Logo/KarmaGautengLogo.gif" rel="nofollow noopener">
__________________
joaquimandrade is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 04-30-2009 , 09:11   Re: Kill assist
Reply With Quote #12

Now some tips. I just looked over the code. Probably i will look at the algorithm later.
__

Evaluate this:

PHP Code:
if(equal(g_szModName"cstrike") || equal(g_szModName"czero") || equal(g_szModName"csv15") || equal(g_szModName"cs13")) 
In plugin_init

Remove this:

PHP Code:
szName1[0] = '^0'
szName2[0] = '^0' 
__________________
joaquimandrade is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 04-30-2009 , 09:44   Re: Kill assist
Reply With Quote #13

Quote:
Originally Posted by Hunter-Digital View Post
Pffffff, big fricken bug :<... when a player's name will be changed that contains an admin's name he's kicked before he can change his name back... damn, I was SURE I'll have a big fricken error like his... anyone know how to block the check for admin or something ?
Don't give admin by name, that is one way
__________________
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
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 04-30-2009 , 10:43   Re: Kill assist
Reply With Quote #14

Quote:
#define is_player(%1) (1 <= %1 && %1 <= g_iMaxPlayers)
->
Code:
#define is_player(%1) (1 <= %1 <= g_iMaxPlayers)

This is a very nice plugin, gj!
__________________

anakin_cstrike is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 04-30-2009 , 12:17   Re: Kill assist
Reply With Quote #15

Quote:
Originally Posted by YamiKaitou View Post
Don't give admin by name, that is one way
Heh, I just want compatibiltiy for servers that have that sort of thing

Quote:
Originally Posted by joaquimandrade View Post
Evaluate this:
PHP Code:
if(equal(g_szModName"cstrike") || equal(g_szModName"czero") || equal(g_szModName"csv15") || equal(g_szModName"cs13")) 
In plugin_init

Remove this:
PHP Code:
szName1[0] = '^0'
szName2[0] = '^0' 
How dumb of me to do 4 string checks every fricken time xD fixed, thanks

and that ... well, I thought I'd make sure the var is cleared :}

Quote:
Originally Posted by anakin_cstrike View Post
This is a very nice plugin, gj!
Modified and thanks

-------------------

New source uploaded, v1.0c =)

Also, I want to make this to work for other mods as well, but I don't know team names for dod, etc... can anyone help me on making this for dod and other mods 'cause I don't know how they react and I don't have the games...
__________________
Hunter-Digital is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 04-30-2009 , 13:41   Re: Kill assist
Reply With Quote #16

Was thinking about that when playing TF2, nice someone actually did it. However, here are some things you could/should change:

- Use get_cvar_pointer on amx_mode (check if it exists)
- Use formatex where applicable
- Why do you use g_bBlockDeathMsg? When you are not using emessages your plugin won't be able to block them anyway.
__________________
In Flames we trust!

Last edited by Nextra; 04-30-2009 at 15:02.
Nextra is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 04-30-2009 , 14:28   Re: Kill assist
Reply With Quote #17

Quote:
Originally Posted by Nextra View Post
However, here are some things you could/should change:
- Use get_cvar_pointer on amx_mode (check if it exists)
- Use formatex were applicable
- Why do you use g_bBlockDeathMsg? When you are not using emessages your plugin won't be able to block them anyway.
- hmm, never done that... I shall modify and test it out
- what's with formatex ? I didn't experiment much with formatting stuff, only format()
- ooooh... riight fixing

thanks for input :}

new source uploaded

edit: oh, now I get the point with formatex, doesn't do a copyback, I don't use such thing in here so I could use that because it's faster... ok, done source uploaded... again
__________________

Last edited by Hunter-Digital; 04-30-2009 at 14:54.
Hunter-Digital is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-30-2009 , 15:30   Re: Kill assist
Reply With Quote #18

hamdatas.ini doesn't seems to support csv15 and cs13
Even setting @mirror cstrike csv15 i'm not sure it would work.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
ajvn
Member
Join Date: Dec 2007
Old 04-30-2009 , 15:49   Re: Kill assist
Reply With Quote #19

Awesome! I made request for similiar plugin 2 months ago. Maybe you can add more features:

http://forums.alliedmods.net/showthread.php?t=89068
ajvn is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 04-30-2009 , 16:37   Re: Kill assist
Reply With Quote #20

Really nice plugin, the code is extremely clean and just easy to read from. ;)

I have a few notes/questions though(probably stupid ones):

1) About iMinDamage = ch_pCVar_minDamage, why creating an extra var when you can just call it from first place iMinDamagePCVar or something?

2) About g_iDamage[p][iVictim] > iMinDamage, since it's the minimum damage, shouldn't it be: g_iDamage[p][iVictim] >= iMinDamage?

3) I think that this:
PHP Code:
for(1<= g_iMaxPlayersp++)
        {
            if(
!= iKiller && g_bOnline[p] && iKillerTeam == get_user_team(p) && g_iDamage[p][iVictim] > iMinDamage && g_iDamage[p][iVictim] > iDamage2)
            {
                
iKiller2 p
                iDamage2 
g_iDamage[p][iVictim]
                
g_iDamage[p][iVictim] = 0
            
}
        } 
should be like this:
PHP Code:
for(1<= g_iMaxPlayersp++)
        {
            if(
!= iKiller && g_bOnline[p] && iKillerTeam == get_user_team(p) && g_iDamage[p][iVictim] > iMinDamage && g_iDamage[p][iVictim] > iDamage2)
            {
                
iKiller2 p
                iDamage2 
g_iDamage[p][iVictim]
            }
            
            
g_iDamage[p][iVictim] = 0
        

since the victim already died...

4) I think you should create a global var to check the players' teams when they join a cretain team because not only that you use get_user_team everytime a player dies, you also use a loop and inside the loop you use that native so I just thought maybe it would be more efficient to create a global var instead...

5) Finally, I'd like to suggest you to add friendly fire compatibility. ;)


Sorry for nagging and nice plugin!
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
Reply


Thread Tools
Display Modes

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 10:16.


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