Raised This Month: $ Target: $400
 0% 

Porting from AMXMOD question


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
marker5a
Junior Member
Join Date: Nov 2004
Old 01-17-2005 , 13:35   Porting from AMXMOD question
Reply With Quote #1

Ok, I downloaded the advnaced damage report plugin made for AMX MOD, and have been trying to port it to AMXMODX, because I cannot find that version anywhere. I compiled it, and tried to run it, and got the following error message.

L 01/17/2005 - 13:12:45: [AMXX] Invalid event (name "Damage") (plugin "advanced_damage_report.amxx")
L 01/17/2005 - 13:12:45: [AMXX] Native error in "register_event" on line 74 (file "advanced_damage_report.sma").

Here is the script,
Code:
/* AMX Mod script. 
* 
* (c) Copyright 2002, Written by Rav 
* This file is provided as is (no warranties). 
* 
* Changelog 
* 
* Version 1.10 - Initial Build 
* Version 1.12 - Added distance and body part. 
* Version 1.13 - Changed user flags for rpt[16] 
* Version 1.14 - Changed commands to console "reporton" "reportoff", user can now set their own hplevel 
* 
*/ 

#include <amxmodx> 

new body_part[8][] = {"Whole Body","Head","Chest","Stomach","Left Arm","Right Arm","Left Leg","Right Leg"}  
new hpLevel[33] 
new bool:rpt[33] 

public hit_reportoff( id ) { 
   rpt[id] = false 
   client_print(id,print_chat,"* Hit Report has been disabled") 
   return PLUGIN_HANDLED  
} 

public hit_reporton( id ) {      
   rpt[id] = true  
   new arg1[8] 
   read_argv(1,arg1,7) 
   hpLevel[id] = str_to_num(arg1) 
   if (hpLevel[id] < 10) 
      hpLevel[id] = 10 
   client_print(id,print_chat,"* Hit Report is now enabled at dmg. level %i", hpLevel[id])  
   return PLUGIN_HANDLED  
}  

public damage_event( victim ) { 
   new damage = read_data(2) 
   new weapon, hitplace  
   new attacker = get_user_attacker(victim,weapon,hitplace) 
   if ( !rpt[attacker] || damage < hpLevel[attacker])  
      return PLUGIN_CONTINUE 
   new start[3], end[3],  name[32], wpn[32],ammo, clip 
   new myweapon = get_user_weapon(attacker,ammo,clip) 
   get_weaponname(myweapon,wpn,31)    
   get_user_name(victim,name,31)    
   get_user_origin(victim,start)    
   get_user_origin(attacker,end) 
   set_hudmessage(220,80,0,0.05,0.15,0, 6.0, 12.0, 1.0, 2.0, 1)    
   show_hudmessage(attacker,"ATTACK REPORT:^n^nDAMAGE: %ihp^nPLACE: %s^nWEAPON: %s^nDISTANCE: %dft^nVICTIM: %s^nHEALTH: %i", 
      damage, body_part[hitplace], wpn[7], get_distance(start,end) / 39, name, get_user_health(victim)) 
   return PLUGIN_CONTINUE    
}  

public report_info(id){  
   show_motd(id,"This plugin will display on screen \ 
   what damage you have/are doing to your victim. \ 
   You will see:    ^n^nDAMAGE^nWEAPON^nDISTANCE^nVICTIM^nPLACE^nHEALTH^n^n\ 
   To enable the report use 'reporton < your damage level >' \ 
   to disable it use'reportoff'^n^nWritten by Rav", 
   "Live Damage Report 1.14") 
   return PLUGIN_HANDLED    
} 

public client_putinserver(id){    
   rpt[id] = false 
   return PLUGIN_CONTINUE 
}    

public plugin_init() { 
   register_plugin("Live Damage Report","1.14","RVS") 
   register_event("Damage", "damage_event", "b", "2>10") 
   register_clcmd("reportoff","hit_reportoff") 
   register_clcmd("reporton","hit_reporton") 
   register_clcmd("say /reportinfo","report_info") 
/* register_cvar("amx_rvs_report", "Live Damage Report 1.14",FCVAR_SERVER)  */ 
   return PLUGIN_CONTINUE 
}
If anyone knows how they can help, please let me know ASAP. Thanks so much

Chris
marker5a is offline
 


Thread Tools
Display Modes

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 19:20.


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