Raised This Month: $ Target: $400
 0% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Harley
Member
Join Date: Aug 2006
Old 01-23-2011 , 08:50   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #21

i log this

Quote:
L 01/23/2011 - 14:48:55: [SM] Native "IsPlayerAlive" reported: Invalid client index 0
L 01/23/2011 - 14:48:55: [SM] Displaying call stack trace for plugin "killmessage_overlays.smx":
L 01/23/2011 - 14:48:55: [SM] [0] Line 163, D:\Game\sourcemod\scripting\新建文件夹\killme ssage_overlays.sp::task_Countdown()
L 01/23/2011 - 14:48:58: [SM] Native "IsPlayerAlive" reported: Invalid client index 0
L 01/23/2011 - 14:48:58: [SM] Displaying call stack trace for plugin "killmessage_overlays.smx":
L 01/23/2011 - 14:48:58: [SM] [0] Line 163, D:\Game\sourcemod\scripting\新建文件夹\killme ssage_overlays.sp::task_Countdown()
L 01/23/2011 - 14:49:01: [SM] Native "IsPlayerAlive" reported: Invalid client index 0
L 01/23/2011 - 14:49:01: [SM] Displaying call stack trace for plugin "killmessage_overlays.smx":
__________________
Harley is offline
_caKKa
BANNED
Join Date: Jan 2009
Old 01-25-2011 , 16:09   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #22

i can't download attached .sp file
_caKKa is offline
Black Haze
BANNED
Join Date: Sep 2008
Location: Hamsterdam
Old 01-29-2011 , 13:35   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #23

Is this mod still being maintained?
Black Haze is offline
Zylius
SourceMod Donor
Join Date: Nov 2009
Old 01-30-2011 , 05:21   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #24

Same here - can't download the .sp file :S
Zylius is offline
siangc
Senior Member
Join Date: Mar 2010
Old 01-30-2011 , 06:24   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #25

Here's the sp file, since the link on first page is dead.
I only edited sv_cheats 0, and tried to fix the filepaths.. But without success.
Attached Files
File Type: sp Get Plugin or Get Source (killmessage_overlays.sp - 537 views - 5.3 KB)
__________________

Last edited by siangc; 01-30-2011 at 06:31.
siangc is offline
Black Haze
BANNED
Join Date: Sep 2008
Location: Hamsterdam
Old 01-30-2011 , 06:43   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #26

Quote:
Originally Posted by siangc View Post
Here's the sp file, since the link on first page is dead.
I only edited sv_cheats 0, and tried to fix the filepaths.. But without success.
Thanks a lot, I'll have a go at it and reupload it if I'm able to fix it!
Black Haze is offline
rtk
Senior Member
Join Date: Dec 2009
Old 01-30-2011 , 14:32   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #27

I would love to see this working
rtk is offline
Black Haze
BANNED
Join Date: Sep 2008
Location: Hamsterdam
Old 01-30-2011 , 19:06   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #28

Ok shit now I'm missing the overlays :p
Could someone upload one of the overlays, preferably the files
  • materials/overlays/kill/kill_1.vtf
  • materials/overlays/kill/kill_1.vmt
Black Haze is offline
Black Haze
BANNED
Join Date: Sep 2008
Location: Hamsterdam
Old 01-30-2011 , 22:13   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #29

Couldn't for the life of me figure out how to fix it, so made a small rewrite. The code below is far from done, but it does show the statically defined texture, without sv_cheats on, and it adds the overlay to the download list.

Todo is add sounds, adapt the functions so any number of overlays can be defined, and some timers to clear the screen in time.

PHP Code:
#include <sourcemod>
#include <sdktools>

public OnPluginStart()
{
    
HookEvent("player_death"Event_PlayerDeath);
}

public 
OnMapStart()
{
    
UnlockConsoleCommandAndConvar("r_screenoverlay");
    
PrepareOverlays();
}

//UnlockConsoleCommandAndConvar by AtomicStryker, http://forums.alliedmods.net/showpost.php?p=1318884&postcount=7
UnlockConsoleCommandAndConvar(const String:command[])
{
    new 
flags GetCommandFlags(command);
    if (
flags != INVALID_FCVAR_FLAGS)
    {
        
SetCommandFlags(commandflags & ~FCVAR_CHEAT);
    }
    
    new 
Handle:cvar FindConVar(command);
    if (
cvar != INVALID_HANDLE)
    {
        
flags GetConVarFlags(cvar);
        
SetConVarFlags(cvarflags & ~FCVAR_CHEAT);
    }
}  

public 
Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
victim GetClientOfUserId(GetEventInt(event"userid"))
    new 
attacker GetClientOfUserId(GetEventInt(event"attacker"));
    new 
bool:headshot GetEventBool(event"headshot");
    new 
String:weapon[32];
    
GetEventString(event"weapon",weaponsizeof(weapon));
    
    
ClearScreen(attacker);
    
ShowKillMessage(attacker);    
}

public 
ShowKillMessage(client)
{
    
ClientCommand(client"r_screenoverlay \"overlays/kill/kill_1.vtf\"");
}

public 
ClearScreen(client)
{
    
ClientCommand(client"r_screenoverlay \"\"");
}

public 
PrepareOverlays()
{
    new 
String:overlays_file[64];

    
Format(overlays_file,sizeof(overlays_file),"overlays/kill/kill_1.vtf");
    
PrecacheDecal(overlays_file,true);
    
AddFileToDownloadsTable("materials/overlays/kill/kill_1.vtf");

    
Format(overlays_file,sizeof(overlays_file),"overlays/kill/kill_1.vmt");
    
PrecacheDecal(overlays_file,true);
    
AddFileToDownloadsTable("materials/overlays/kill/kill_1.vmt");

Also a small question to whoever knows the answer: Do I really need to precache both the vmt and the vtf file, or would just one of em do fine?

Last edited by Black Haze; 01-30-2011 at 22:17.
Black Haze is offline
siangc
Senior Member
Join Date: Mar 2010
Old 01-31-2011 , 01:22   Re: [CSS].CS Online kill message,For CS Source,overlays
Reply With Quote #30

About adding both the vmt and vtf file to some list, it was only one of the types in the original plugin (can't remember which), sorry, forgot I had been messing around with that too.
Attached Files
File Type: zip sound-and-gfx.zip (388.0 KB, 433 views)
__________________
siangc 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 21:21.


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