Raised This Month: $ Target: $400
 0% 

DeathMsg Functions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
emoD
Junior Member
Join Date: Oct 2007
Old 11-17-2007 , 06:41   DeathMsg Functions
Reply With Quote #1

Hello,

I Started To Script The Big Plugin For Advanture Server (CS).

I Need To Return iKiller , iVictim , iHeadShot , iDamage.
But I Don't Know Those Functions, I Included Amxmodx,Amxmisc,Cstrike,Fun.
Here Is The Code:
Code:
public plugin_init() {  register_plugin(PLUGIN, VERSION, AUTHOR)  register_event("Death", "iDeath", "a") } public iDeath() {  new iKiller = read_data(1)  new iVictim = read_data(2)  new iHeadshot = read_data(3)  new iDamage = read_data(4)    return PLUGIN_HANDLED }

I Don't Know If This Event (iDeath) Return Those Variables Correctly.

Last edited by emoD; 11-17-2007 at 06:45. Reason: Gamma
emoD is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-17-2007 , 07:00   Re: DeathMsg Functions
Reply With Quote #2

http://wiki.alliedmods.net/Half-Life...vents#DeathMsg

read_data(4) return the truncated weapon name. So it's a string.

Also : register_event("Death", "iDeath", "a")

should be : register_event("DeathMsg", "iDeath", "a")

No need to return PLUGIN_HANDLED.
__________________
Arkshine is offline
emoD
Junior Member
Join Date: Oct 2007
Old 11-17-2007 , 07:11   Re: DeathMsg Functions
Reply With Quote #3

Thanks For Info But How I Can Return Damage?
emoD is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-17-2007 , 07:12   Re: DeathMsg Functions
Reply With Quote #4

Use Damage event.

http://wiki.alliedmods.net/Half-Life..._Events#Damage
__________________
Arkshine is offline
emoD
Junior Member
Join Date: Oct 2007
Old 11-17-2007 , 07:21   Re: DeathMsg Functions
Reply With Quote #5

But Can You Show Me Example Plz , Cuz I Don't Have Idea How To Use That Information?

P.S: +Karma To You

Last edited by emoD; 11-17-2007 at 07:28.
emoD 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 01:14.


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