SourceMod Donor
Join Date: Apr 2004
Location: Levittown, NY
|
![Old](images/statusicon/post_old.svg)
07-20-2004
, 05:55
|
#5
|
I edited the code for this ever so slightly, and I get errors.
Quote:
Originally Posted by The jtp10181 Way
Code:
The instruction at 0x0041c40a referenced memory at 0x00000008.
The memory could not be read.
Code:
/********************************************************************************
* Plugin name : Damage Done.
* Made by : Dygear
* Modules required : None
* Warranties : This file is provided as is (no warranties).
* Thanks to : TaL for this idea, and Lud for all of his help and puting
* up with me for soo long.
********************************************************************************/
#include <amxmodx>
#include <cstrike>
public on_damage(id){
new attacker = get_user_attacker(id)
new damage = read_data(2)
if (is_user_alive(id) && is_user_alive(attacker)){
if (cs_get_user_team(id) == "CS_TEAM_CT"){
set_hudmessage(0, 100, 200, -1.0, 0.50, 2, 0.1, 4.0, 0.02, 0.02, 12)
show_hudmessage(attacker,"%i^n", damage)
}else{
set_hudmessage(255, 0, 0, -1.0, 0.50, 2, 0.1, 4.0, 0.1, 0.1, 13)
show_hudmessage(id,"%i^n",damage)
}
return PLUGIN_CONTINUE
}
public plugin_init(){
register_plugin("Damage Done","0.1","Dygear")
register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")
return PLUGIN_CONTINUE
}
|
Quote:
Originally Posted by The Ryan Way
Code:
The instruction at 0x0041c40a referenced memory at 0x00000008.
The memory could not be read.
Code:
/********************************************************************************
* Plugin name : Damage Done.
* Made by : Dygear
* Modules required : None
* Warranties : This file is provided as is (no warranties).
* Thanks to : TaL for this idea, and Lud for all of his help and puting
* up with me for soo long.
********************************************************************************/
#include <amxmodx>
#include <cstrike>
public ev_damage( vIndex ){
new aIndex = get_user_attacker( vIndex );
new iDamage = read_data( 2 );
if (cs_get_user_team( vIndex ) == "CS_TEAM_CT"){
set_hudmessage(0, 100, 200, -1.0, 0.50, 2, 0.1, 4.0, 0.02, 0.02, 12)
show_hudmessage( vIndex , "%i^n" , iDamage)
}else{
set_hudmessage(255, 0, 0, -1.0, 0.50, 2, 0.1, 4.0, 0.1, 0.1, 13)
show_hudmessage( vIndex , "%i^n" , iDamage)
}
}
register_plugin(){
register_plugin("Damage Done","0.1","Dygear")
register_event( "Damage", "ev_damage", "b" );
return PLUGIN_CONTINUE;
}
|
Quote:
Originally Posted by The Dygear Way
Code:
The instruction at 0x0041c40a referenced memory at 0x00000008.
The memory could not be read.
Code:
/********************************************************************************
* Plugin name : Damage Done.
* Made by : Dygear
* Modules required : None
* Warranties : This file is provided as is (no warranties).
* Thanks to : TaL for this idea.
* Lud for all of his help and puting up with me for soo long.
********************************************************************************/
#include <amxmodx>
#include <cstrike>
public on_damage(id){
new attacker = get_user_attacker(id)
if (is_user_alive(id) && is_user_alive(attacker)){
if (cs_get_user_team(id) == "CS_TEAM_CT"){
new damage = read_data(2)
set_hudmessage(0, 100, 200, -1.0, 0.50, 2, 0.1, 4.0, 0.02, 0.02, 12)
show_hudmessage(attacker,"%i^n", damage)
}else{
new damage = read_data(2)
set_hudmessage(255, 0, 0, -1.0, 0.50, 2, 0.1, 4.0, 0.1, 0.1, 13)
show_hudmessage(id,"%i^n",damage)
}
}
return PLUGIN_CONTINUE
}
public plugin_init(){
register_plugin("Damage Done","0.1","Dygear")
register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")
return PLUGIN_CONTINUE
}
|
__________________
|
|