AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   DeathMsg Functions (https://forums.alliedmods.net/showthread.php?t=63291)

emoD 11-17-2007 06:41

DeathMsg Functions
 
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.

Arkshine 11-17-2007 07:00

Re: DeathMsg Functions
 
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.

emoD 11-17-2007 07:11

Re: DeathMsg Functions
 
Thanks For Info But How I Can Return Damage?

Arkshine 11-17-2007 07:12

Re: DeathMsg Functions
 
Use Damage event.

http://wiki.alliedmods.net/Half-Life..._Events#Damage

emoD 11-17-2007 07:21

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

P.S: +Karma :P To You


All times are GMT -4. The time now is 01:14.

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