AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Exec on death (https://forums.alliedmods.net/showthread.php?t=13959)

Bento 06-04-2005 17:19

Exec on death
 
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 06-04-2005 17:41

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?

More 06-04-2005 17:47

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") }

Bento 06-04-2005 17:56

doesnt work

Bento 06-04-2005 18:15

Got it :D

I'll post it here when im finished!


All times are GMT -4. The time now is 16:43.

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