AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   event when terro dies (https://forums.alliedmods.net/showthread.php?t=113746)

FiFiX 12-29-2009 18:43

event when terro dies
 
Hello guys, I need event when terro dying. In this event I need killer's id.

Mxnn 12-29-2009 20:36

Re: event when terro dies
 
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init() {
    
register_plugin("pepito""1.0""Mxnn")
    
    
register_event("DeathMsg""Event_DeathMsg""a")
}

Event_DeathMsg() {
    
    new 
victim read_data(2)
    if (
cs_get_user_team(victim) == CS_TEAM_T) {
        new 
attacker read_data(1
    }



IneedHelp 12-29-2009 21:15

Re: event when terro dies
 
wtf mxnn..

PHP Code:

// [ ... ]
register_event("DeathMsg""Event_DeathMsg""a")

// [ ... ]
public Event_DeathMsg()
{
    new 
attacker read_data(1)
    new 
victim read_data(2)

    if (
cs_get_user_team(victim) == CS_TEAM_T)
                
// terrorist died


§

Mxnn 12-29-2009 21:21

Re: event when terro dies
 
Yes HAJAAHAH i'm wrong sory. I'm do a plugin and i do this very quickly. Sry i will fix it

FiFiX 12-30-2009 04:18

Re: event when terro dies
 
Thank you guys :)


All times are GMT -4. The time now is 04:12.

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