AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   Half-Life | No Wall Gauss (https://forums.alliedmods.net/showthread.php?t=345494)

kml_ghost 01-20-2024 10:51

Half-Life | No Wall Gauss
 
1 Attachment(s)
Description;
Turns on/off gauss damage taken from walls

Cvar;
sv_wallgauss 1-damage on / 0-damage off

Mo3taz 01-21-2024 12:38

Re: Half-Life | No Wall Gauss
 
amxx file is not allowed
just put the sma and it will be compiled

DJEarthQuake 01-23-2024 17:05

Re: Half-Life | No Wall Gauss
 
I saw the word 'useless' in the function prototype. Check it out. Falling damage is worldspawn. Crossbow will show as bolt, etc. Gauss will always be a client index. Just supplying some useless information. Haven't tested your work yet. Maybe add a vote to enable disable your plugin since if one cannot wallbang that spoils the fun factor by and large.

Code:
#include amxmodx #include fakemeta #include hamsandwich public plugin_init() {     register_plugin("Inflictor Test","1.0.0","SPiNX")     RegisterHam(Ham_TakeDamage, "player", "Event_Damage", 1); } public Event_Damage(victim, inflictor, attacker, Float:damage, damagebits) {     static szClass[MAX_NAME_LENGTH];     pev(inflictor, pev_classname, szClass, charsmax(szClass))     client_print 0, print_center, "%s", szClass }

kml_ghost 01-24-2024 01:18

Re: Half-Life | No Wall Gauss
 
Quote:

Originally Posted by DJEarthQuake (Post 2816482)
I saw the word 'useless' in the function prototype. Check it out. Falling damage is worldspawn. Crossbow will show as bolt, etc. Gauss will always be a client index. Just supplying some useless information. Haven't tested your work yet. Maybe add a vote to enable disable your plugin since if one cannot wallbang that spoils the fun factor by and large.

Code:
#include amxmodx #include fakemeta #include hamsandwich public plugin_init() {     register_plugin("Inflictor Test","1.0.0","SPiNX")     RegisterHam(Ham_TakeDamage, "player", "Event_Damage", 1); } public Event_Damage(victim, inflictor, attacker, Float:damage, damagebits) {     static szClass[MAX_NAME_LENGTH];     pev(inflictor, pev_classname, szClass, charsmax(szClass))     client_print 0, print_center, "%s", szClass }

The plugin has been tested, the function will ignore weapons other than Gauss. Gauss index=9 -> Please check line 36, thx.

DJEarthQuake 01-24-2024 07:20

Re: Half-Life | No Wall Gauss
 
Too hard-coded!
Use the define.
#define HLW_GAUSS 9
Code:

//if(!gUserWeapon || gUserWeapon != 9)

if(!gUserWeapon || gUserWeapon != HLW_GAUSS)


anssik 02-01-2024 02:21

Re: Half-Life | No Wall Gauss
 
1 Attachment(s)
Thanks for this.

What I was looking for though was to prevent self-damage from gauss, so riffing on your plugin here's one which does just that but does not prevent damage to enemies.

kml_ghost 02-01-2024 16:46

Re: Half-Life | No Wall Gauss
 
Quote:

Originally Posted by anssik (Post 2817115)
Thanks for this.

What I was looking for though was to prevent self-damage from gauss, so riffing on your plugin here's one which does just that but does not prevent damage to enemies.

Great selfgauss idea thanks.


All times are GMT -4. The time now is 00:15.

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