AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   SuperNades - Modify HE Damage and Radius (https://forums.alliedmods.net/showthread.php?t=69660)

L. Duke 04-08-2008 15:43

SuperNades - Modify HE Damage and Radius
 
2 Attachment(s)
Modify the radius and damage of he grenades. Each cvar acts as a multiplier where 1.0 is the standard value, 2.0 would be double damage, 0.5 would be half damage, etc.

Requires installation of my hacks extension.

CVARS:

"sm_supernades_radius" = "2.0"
- radius multiplier

"sm_supernades_damage" = "2.0"
- damage multiplier

Peoples Army 04-08-2008 18:26

Re: SuperNades - Modify HE Damage and Radius
 
nice gj :up:


p.s you dont have to uplaod the .smx file , just the .sp it will automaticly compile it and make it availabel as a .smx

SixSicSix 04-08-2008 20:11

Re: SuperNades - Modify HE Damage and Radius
 
I think he uses an .inc file...

Gently 04-08-2008 21:06

Re: SuperNades - Modify HE Damage and Radius
 
cool plugin...any chance any coder will ever make a nade warmup round ..or is it a lost cause...

Fredd 04-08-2008 21:18

Re: SuperNades - Modify HE Damage and Radius
 
Gj LDuke

V0gelz 04-09-2008 10:30

Re: SuperNades - Modify HE Damage and Radius
 
Nice plugin duke :)

teh_l33tz0r 06-02-2008 13:07

Re: SuperNades - Modify HE Damage and Radius
 
Hey, just wondering, is it possible tto increase all damage a player causes by all weapons by a certain percentage eg, like 5-10% increase on all damage caused and 10-15% and 15-20% etc all the way to 100% and then 200%.

The admin of the server/plugin would sets which players, by steam id, get which damage bonus.

:D

teh_l33tz0r 06-02-2008 13:35

Re: SuperNades - Modify HE Damage and Radius
 
Here's an attempted eventscripts version (python) if you want to take a look...this crashes the server though because it's trying to force the kills to not come up as skull kills (which is what im looking for). You add the user by typing add_user steamid

# ./cstrike/addons/eventscripts/damage/damage.py

import es, cPickle, playerlib, os.path

admins = ['STEAM_0:0:234932', 'STEAM_0:0:11089864', 'STEAM_0:0:11089864']
use_est = 1 # if one, est will be used to deal damage, that way if the player kills them witht he extra damage, it doesn't show as a skull

player_data = {}

abcdamage = 1

def load():
if not es.exists('clientcommand', 'add_user'):
es.regclientcmd('add_user', 'damage/add_user')
player_db = es.getAddonPath('damage') + '/players.db'
if os.path.isfile(player_db):
global player_data
players = open(player_db)
player_data = cPickle.load(players)
players.close()

def unload():
if es.exists('clientcommand', 'add_user'):
es.unregclientcmd('add_user')
save_data

def add_user():
userid = es.getcmduserid()
try:
es.getargs().split(' ')
except:
es.tell(userid, '#multi', '#greenInvalid Syntax -- #lightgreenadd_user <player> <damage>')
return
if es.getplayersteamid(userid) in admins:
if len(es.getargs().split(' ')) >= 2:
target = es.getargs().split(' ')[0]
amount = es.getargs().split(' ')[1]
if es.getuserid(target):
global player_data
if isfloat(amount):
amount = float(amount)
if amount > 0:
player_data[es.getplayersteamid(es.getuserid(target))] = amount
es.tell(userid, '#multi', '#greenYou have made #lightgreen%s#green a user with #lightgreen%s%#green extra damage!'%(playerlib.getPlayer(es.getuserid(target)).get('name'), amount))
else:
del player_data[es.getplayersteamid(es.getuserid(target))]
save_data()
else:
es.tell(userid, '#green', 'Please input a float or integer above 0! 0 is to delete user')
else:
es.tell(userid, '#multi', '#greenSorry, #lightgreen%s#green is an invalid player'%target)
else:
es.tell(userid, '#multi', '#greenInvalid Syntax -- #lightgreenadd_user <player> <damage>')
else:
es.tell(userid, '#green', 'You are not an admin!')

def isfloat(amount):
if amount.isdigit():
return 1
index = amount.find('.')
if not index == -1:
if str(amount[0:amount.find('.')]).isdigit():
if str(amount[amount.find('.') + 1:]).isdigit():
return 1
return 0

def save_data():
player_db = open(es.getAddonPath('damage') + '/players.db', 'w')
cPickle.dump(player_data, player_db)
player_db.close()

def player_hurt(ev):
if not ev['attacker'] == ev['userid'] and not ev['weapon'] == 'point_hurt':
if player_data.has_key(es.getplayersteamid(ev['attacker'])):
damage = int(ev['dmg_health']) * (player_data[es.getplayersteamid(ev['attacker'])] / 100.0)
if use_est:
if abcdamage:
es.server.queuecmd('est_damage %s %s %s'%(ev['attacker'], ev['userid'], damage))
global abcdamage
abcdamage = 0
gamethread.delayed(0, un_make_damage)
else:
es.server.queuecmd('damage %s %s 32 %s'%(ev['userid'], damage, ev['attacker']))

def un_make_damage():
global abcdamage
abcdamage = 1

Fredd 06-02-2008 14:41

Re: SuperNades - Modify HE Damage and Radius
 
this board is not for ES please take this else where.

L. Duke 06-02-2008 15:17

Re: SuperNades - Modify HE Damage and Radius
 
Quote:

Originally Posted by teh_l33tz0r (Post 633602)
Hey, just wondering, is it possible tto increase all damage a player causes by all weapons by a certain percentage eg, like 5-10% increase on all damage caused and 10-15% and 15-20% etc all the way to 100% and then 200%.

The admin of the server/plugin would sets which players, by steam id, get which damage bonus.

:D

This would need a TraceAttack hook and to modify the damage info. Fredd's hooks extension will allow you to do this very easily.


All times are GMT -4. The time now is 17:13.

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