Raised This Month: $ Target: $400
 0% 

Exec on death


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bento
SourceMod Donor
Join Date: May 2005
Location: The Netherlands
Old 06-04-2005 , 17:19   Exec on death
Reply With Quote #1

I'm making a plugin for counterstrike, and i want something to be executed on a player when he dies.. (Only the player who dies can hear/see/whatever it)



Code:
public client_connect(id) {    client_cmd(id,"mp3 play sound/misc/intro_new.mp3")    return PLUGIN_CONTINUE }

Code:
public client_connect(id)

Likt that, but this is when a client connects, now i want this when a client dies.

I only found this:

public client_death(id) but that only worx for TFC or DOD...

Is there anything like this for Cstrike?
Bento is offline
Bento
SourceMod Donor
Join Date: May 2005
Location: The Netherlands
Old 06-04-2005 , 17:41  
Reply With Quote #2

Got this now:

Code:
#include <amxmodx> #include <csx> public client_death(id) {    client_cmd(id,"mp3 play sound/misc/kenny1.mp3")    return PLUGIN_CONTINUE }
But when I kill some1, i hear it... And it was meant to be heared by the victim so i did this:

Code:
#include <amxmodx> #include <csx> public client_death(victim_id) {    client_cmd(victim_id,"mp3 play sound/misc/kenny1.mp3")    return PLUGIN_CONTINUE }


But now it wonr compile...

Getting this:

Code:
//AMXXSC compile.exe
// by the AMX Mod X Dev Team


//// diemusic.sma
// \\Punani\Master\hlserver\czero\addons\amxmodx\scripting\diemusic.sma(10) : er
ror 025: function heading differs from prototype
//
// 1 Error.
// Could not locate output file \\Punani\Master\hlserver\czero\addons\amxmodx\sc
ripting\compiled\diemusic.amx (compile failed).
//
// Compilation Time: 0,31 sec
// ----------------------------------------

Press enter to exit ...
What can i do to fix it?
Bento is offline
More
Member
Join Date: Nov 2004
Location: Internet
Old 06-04-2005 , 17:47  
Reply With Quote #3

Code:
public plugin_init() {   register_event("DeathMsg", "player_die", "a") } public player_die() {   new victim = read_data(2)   client_cmd(victim, "say I am dead right now") }
More is offline
Bento
SourceMod Donor
Join Date: May 2005
Location: The Netherlands
Old 06-04-2005 , 17:56  
Reply With Quote #4

doesnt work
Bento is offline
Bento
SourceMod Donor
Join Date: May 2005
Location: The Netherlands
Old 06-04-2005 , 18:15  
Reply With Quote #5

Got it

I'll post it here when im finished!
Bento 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 16:43.


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