AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Damage Editor: (https://forums.alliedmods.net/showthread.php?t=17531)

pdoubleopdawg 09-03-2005 13:48

Damage Editor:
 
I was thinking about editting damage. Although, would this actually work both client, and serverside? Aswell as, could you return FMRES_SUPERCEDE or something so the regular damage doesn't cut in?

--Thanks!

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fakemeta> public plugin_init() {     register_plugin("InstaKill","0.1","DahVid")     register_cvar("dmg_on","0")     register_cvar("dmg_armorsave","0")     register_cvar("dmg_type","1")     register_cvar("dmg_num","1000")     register_event("Damage","Damage_Event","be","2>0") } public Damage_Event(id) {     if(!get_cvar_num("dmg_on"))         return PLUGIN_HANDLED     new origin[3]     get_user_origin(id,origin)         new armorsave=get_cvar_num("dmg_armorsave")     new damage=get_cvar_num("dmg_num")     new damage_type=get_cvar_num("dmg_type")         message_begin(MSG_ONE,get_user_msgid("Damage"),{0,0,0},id)     write_byte(armorsave)     write_byte(damage) //gay plugins..     write_long(damage_type)     write_coord(origin[0])     write_coord(origin[1])     write_coord(origin[2])     return PLUGIN_CONTINUE }

XxAvalanchexX 09-03-2005 16:33

The Damage event just lets the client know when you take damage so it can display things like the red damage bars in the middle of the screen or water drowning symbols, etcetera (possibly also updates the health display if a Health message isn't sent along with it). Any message sent by the server simply effects the display of the client.

pdoubleopdawg 09-03-2005 16:48

Thanks for confirming my idea.
Is there anywhere in one of this modules where I could possibly modify it?

If not, would it be applicable to make a module to do this, without hacking it up?

LynX 09-03-2005 17:17

Code:
entity_set_float(index, EV_FL_takedamage, float.point.number )

This would edit the players takedamage value, the more higher, the more damage they got.

If I didn't understood question correctly, sorry.

pdoubleopdawg 09-03-2005 17:44

Yes, but could you override the default damages dealt by the guns?

LynX 09-03-2005 18:13

I think so... Lemme investigate...

pdoubleopdawg 09-03-2005 19:18

Quote:

Originally Posted by LynX
I think so... Lemme investigate...

Ok, if you get any results post 'em.


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

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