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

[CSS].CS Online kill message,For CS Source,overlays


Post New Thread Reply   
 
Thread Tools Display Modes
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 01-18-2011 , 14:18   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #11

Quote:
Originally Posted by siangc View Post
I tried removing sv_cheats from it, but it didn't work and I got massive spam with this. Maybe I messed up somehow, I hope somebody can make it work without sv_cheats

L 01/18/2011 - 15:10:13: [SM] Native "IsPlayerAlive" reported: Invalid client index 0
L 01/18/2011 - 15:10:13: [SM] Displaying call stack trace for plugin "killmessage_overlays.smx":
L 01/18/2011 - 15:10:13: [SM] [0] Line 138, killmessage_overlays.sp::task_Countdown()
There's no check to see if the client is world or not. A simple check like this should suffice.
PHP Code:
if(attacker 1)
{
    return 
Plugin_Handled;

EDIT: This should function flawlessly (just like TheTwistedPanda said) without modifying cheats.
KyleS is offline
siangc
Senior Member
Join Date: Mar 2010
Old 01-18-2011 , 14:34   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #12

I gave it another go, it gives me 7 warning messages when I compile about some tag mismatches, only change i did was "ServerCommand("sv_cheats 0");". Clients don't download the sounds and overlay files, tried with and without fastdl. When i installed the files and sounds manually, the sounds didn't work in game and the overlay made everything black tinted (see image below).

[IMG]http://img683.**************/img683/6987/glasswar0121.jpg[/IMG]

I have no idea if I'm doing something wrong :S
running latest stable sourcemod.

edit:
I hardly know anything about scripting, can you tell me where i should put that code kyle?
__________________

Last edited by siangc; 01-18-2011 at 14:50.
siangc is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 01-18-2011 , 15:15   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #13

Not tested at all, will be removed when the author rectifies this (copy pasted the changes from the modified stock, not really sure what's going on there).

EDIT: Removed.

Last edited by KyleS; 01-19-2011 at 02:41.
KyleS is offline
siangc
Senior Member
Join Date: Mar 2010
Old 01-18-2011 , 15:48   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #14

I just tried your version Kyle, it doesn't produce any errors in the logs, but it makes the same black tint all over the screen when a decal appears, and it doesn't play any sound, or downloads the files to the clients.
Is it only me who's got these problems?
__________________
siangc is offline
Martin
BANNED
Join Date: Mar 2009
Location: China
Old 01-19-2011 , 02:39   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #15

Quote:
Originally Posted by Kyle12 View Post
Awesome! I can't wait to try this out once it's fixed up.

Also, just as an example:
PHP Code:
    if(g_killCount[attacker] == 1)
    {
        if(
StrEqual(weapon,"hegrenade"))
            
ShowKillMessage(attacker,kill_grenade);
        else if(
StrEqual(weapon,"knife"))
            
ShowKillMessage(attacker,kill_knife);
        else if(
headshot)
            
ShowKillMessage(attacker,kill_headshot);
        else
            
ShowKillMessage(attacker,kill_1);
    }
    else if(
g_killCount[attacker] == 2)
    {
        
ShowKillMessage(attacker,kill_2);
    }
    else if(
g_killCount[attacker] == 3)
    {
        
ShowKillMessage(attacker,kill_3);
    }
    else if(
g_killCount[attacker] == 4)
    {
        
ShowKillMessage(attacker,kill_4);
    } 
Could be:
PHP Code:
    new AttackerKillCount g_killCount[attacker];
    switch(
AttackerKillCount)
    {
        case 
1:
        {
            if(
StrEqual(weapon"hegrenade"))
            {
                
ShowKillMessage(attackerkill_grenade);
            }
 
            else if(
StrEqual(weapon,"knife"))
            {
                
ShowKillMessage(attackerkill_knife);
            }
 
            else if(
headshot)
            {
                
ShowKillMessage(attackerkill_headshot);
            }
 
            else
            {
                
ShowKillMessage(attackerkill_1);
            }
        }
 
        case 
2:
        {
            
ShowKillMessage(attackerkill_2);
        }
 
        case 
3:
        {
            
ShowKillMessage(attackerkill_3);
        }
 
        case 
4:
        {
            
ShowKillMessage(attackerkill_4);
        }
    } 
Just so you're not reindexing the array (no idea if this is the proper term, sorry if it isn't) every time, caching is nice

Thanks , because I am not used to use Switch Case.

Last edited by Martin; 01-19-2011 at 02:42.
Martin is offline
Send a message via ICQ to Martin
Martin
BANNED
Join Date: Mar 2009
Location: China
Old 01-19-2011 , 02:41   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #16

Quote:
Originally Posted by Kyle12 View Post
There's no check to see if the client is world or not. A simple check like this should suffice.
PHP Code:
if(attacker 1)
{
    return 
Plugin_Handled;

EDIT: This should function flawlessly (just like TheTwistedPanda said) without modifying cheats.
Thanks ,I hava edited.

Last edited by Martin; 01-19-2011 at 02:49.
Martin is offline
Send a message via ICQ to Martin
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 01-19-2011 , 02:59   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #17

new Handle:g_killCount[33]; - Shouldn't be a handle (This is why you're getting compilation warnings).

Instead of 33 you should be using MAXPLAYERS+1, I personally run now 7 64slot servers. This plugin would not function on them (Array errors most likely).

Last edited by KyleS; 01-25-2011 at 21:40.
KyleS is offline
psychonic

BAFFLED
Join Date: May 2008
Old 01-19-2011 , 07:46   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #18

Quote:
Originally Posted by Kyle12 View Post
new Handle:g_killCount[33]; - Shouldn't be a handle (This is why you're getting compilation warnings).

Instead of 33 you should be using MAXPLAYERS+2, I personally run now 7 64slot servers. This plugin would not function on them (Array errors most likely).
* MAXPLAYERS+1
psychonic is offline
siangc
Senior Member
Join Date: Mar 2010
Old 01-19-2011 , 07:57   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #19

I think there's a problem with the filepaths? Clients don't download the files when they join, when i installed them manually only the images worked (no sounds).

vox/ultrakill should be vox/ultrakill.wav, but should the path be "sound/vox/ultrakill.wav"?
__________________
siangc is offline
PStar
Veteran Member
Join Date: Mar 2008
Old 01-19-2011 , 11:45   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #20

Donwloadint hte files are broken, but the overly works fine if i ad the file to my game manually.

Getting this error messages in console:

Quote:
vász Kardiológus killed Orin with ak47.
FCVAR_SERVER_CAN_EXECUTE prevented server running command: speak
Requesting texture value from var "$normalmap" which is not a texture value (material: overlays/kill/kill_headshot)
Requesting texture value from var "$normalmap" which is not a texture value (material: overlays/kill/kill_headshot)
Requesting texture value from var "$normalmap" which is not a texture value (material: overlays/kill/kill_headshot)
Requesting texture value from var "$normalmap" which is not a texture value (material: overlays/kill/kill_headshot)
Requesting texture value from var "$normalmap" which is not a texture value (material: overlays/kill/kill_headshot)
Requesting texture value from var "$normalmap" which is not a texture value (material: overlays/kill/kill_headshot)
Requesting texture value from var "$normalmap" which is not a texture value (material: overlays/kill/kill_headshot)
Requesting texture value from var "$normalmap" which is not a texture value (material: overlays/kill/kill_headshot)
Requesting texture value from var "$normalmap" which is not a texture value (material: overlays/kill/kill_headshot)
Requesting texture value from var "$normalmap" which is not a texture value (material: overlays/kill/kill_headshot)
L
And i think you shoud make the overlay brighter cause no it too dark, and make the colors more vivid.
And maybe move the kill picture to the lower right side of the screen.

Last edited by PStar; 01-19-2011 at 11:50.
PStar 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 11:17.


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