Raised This Month: $ Target: $400
 0% 

Kill Messages


Post New Thread Reply   
 
Thread Tools Display Modes
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 02-17-2011 , 03:40   Re: Kill Messages
Reply With Quote #31

Fantastic work!

One quick suggestion though (did a quick look over)
PHP Code:
public Action:ShowKillMessage(args)
{
...
    
_atCleanTimer[client] = CreateTimer(_dTimerLength,CleanTimer,client);
    
    return 
Plugin_Handled;
}

public 
Action:CleanTimer(Handle:Timerany:client)
{
    
KillTimer(Timer);
    
_atCleanTimer[client] = INVALID_HANDLE;
    
ClearScreen(client);

Using this code. If I were to kill someone, then disconnect. The result would error out because the client index is no longer valid. In this case, nothing dangerous is being set on the client. But if you were to... I don't know, ban a client via a timer. If the client disconnected, and another client connected taking his place. The newly joined client would be banned.

To fix this, pass the clients userid instead then do a check for if client > 0 before you're about to run clientcommand.

Also, you don't need to Kill the Timer since it doesn't repeat
KyleS is offline
Black Haze
BANNED
Join Date: Sep 2008
Location: Hamsterdam
Old 02-17-2011 , 06:58   Re: Kill Messages
Reply With Quote #32

Quote:
Originally Posted by Kyle12 View Post
Fantastic work!

One quick suggestion though (did a quick look over)
PHP Code:
public Action:ShowKillMessage(args)
{
...
    
_atCleanTimer[client] = CreateTimer(_dTimerLength,CleanTimer,client);
    
    return 
Plugin_Handled;
}

public 
Action:CleanTimer(Handle:Timerany:client)
{
    
KillTimer(Timer);
    
_atCleanTimer[client] = INVALID_HANDLE;
    
ClearScreen(client);

Using this code. If I were to kill someone, then disconnect. The result would error out because the client index is no longer valid. In this case, nothing dangerous is being set on the client. But if you were to... I don't know, ban a client via a timer. If the client disconnected, and another client connected taking his place. The newly joined client would be banned.

To fix this, pass the clients userid instead then do a check for if client > 0 before you're about to run clientcommand.

Also, you don't need to Kill the Timer since it doesn't repeat
I kill the timer in case there's already an other one running (kill one, the timer will run for 3 secs then remove the overlay. When you kill someone WITHIN 3 seconds, the first timer that cleans things up needs to die.)

I'll update it later with some error handling.

EDIT: Apparently this killtimer is useless after all, the timer kill I mentioned is somewhere else. This one will die
Black Haze is offline
skabull
Senior Member
Join Date: Mar 2010
Location: Bretagne
Old 02-19-2011 , 03:50   Re: Kill Messages
Reply With Quote #33

Hello,

Great job ...

Is it possible to ensure that the kills are accumulated until the player does not die.

Imagine that the player has made 2 kills! a round and it does not die during this round, then it starts the next round and his first kill! changes in 3 kills! for he had made 2 the next round.

I am willing to propose to the VTF and VMT files of kills over 4 ...

Sorry for my English school, I hope have made my point ...

Goodbye.
skabull is offline
Black Haze
BANNED
Join Date: Sep 2008
Location: Hamsterdam
Old 02-19-2011 , 09:05   Re: Kill Messages
Reply With Quote #34

Quote:
Originally Posted by skabull View Post
Hello,

Great job ...

Is it possible to ensure that the kills are accumulated until the player does not die.

Imagine that the player has made 2 kills! a round and it does not die during this round, then it starts the next round and his first kill! changes in 3 kills! for he had made 2 the next round.

I am willing to propose to the VTF and VMT files of kills over 4 ...

Sorry for my English school, I hope have made my point ...

Goodbye.
Yeah I get what you mean, should be possible. I'll have a go at it at the same time as the other things that need change.
Black Haze is offline
Don3
New Member
Join Date: May 2010
Old 02-19-2011 , 09:24   Re: Kill Messages
Reply With Quote #35

Its there any change to add 2 more things :

After round is end and CT win that round to show a killmessage CT WIN !
and the same for Tero
Don3 is offline
Black Haze
BANNED
Join Date: Sep 2008
Location: Hamsterdam
Old 02-19-2011 , 13:31   Re: Kill Messages
Reply With Quote #36

Quote:
Originally Posted by Don3 View Post
Its there any change to add 2 more things :

After round is end and CT win that round to show a killmessage CT WIN !
and the same for Tero
Could do, but will need overlays made for that, will not release it without working overlays for it.
Black Haze is offline
skabull
Senior Member
Join Date: Mar 2010
Location: Bretagne
Old 02-19-2011 , 17:26   Re: Kill Messages
Reply With Quote #37

Quote:
Originally Posted by Don3 View Post
Its there any change to add 2 more things :

After round is end and CT win that round to show a killmessage CT WIN !
and the same for Tero
Hello,

This plugin does what you ask, it uses an overlay for the purpose of round ...

http://forums.alliedmods.net/showthread.php?t=134155
skabull is offline
MoM
Junior Member
Join Date: Aug 2008
Old 02-19-2011 , 20:04   Re: Kill Messages
Reply With Quote #38

I like this plugin, but i want only the 4 kills! picture to show. So if players get 4 kills they get this pic. The rest i dont really want it ;), otherwise it will be to chaotic (i got a DM).
Is this possible? If yes, could you tell me how?
__________________
MoM is offline
Black Haze
BANNED
Join Date: Sep 2008
Location: Hamsterdam
Old 02-20-2011 , 09:30   Re: Kill Messages
Reply With Quote #39

Quote:
Originally Posted by MoM View Post
I like this plugin, but i want only the 4 kills! picture to show. So if players get 4 kills they get this pic. The rest i dont really want it ;), otherwise it will be to chaotic (i got a DM).
Is this possible? If yes, could you tell me how?
It is possible, I'll try n add it to the next release. It's gonna have a pretty good changelog now anyways :p
Black Haze is offline
skabull
Senior Member
Join Date: Mar 2010
Location: Bretagne
Old 02-20-2011 , 14:34   Re: Kill Messages
Reply With Quote #40

Hello,

Is it possible to give players the ability to choose whether they activate or deactivate the images of kill ...?

As his players are free to see them or not ...
skabull 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 14:03.


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