Raised This Month: $ Target: $400
 0% 

Damageradius like seen in Gasnades für players.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Noizza
Senior Member
Join Date: Apr 2004
Location: Vienna (PROUD)
Old 02-15-2007 , 21:26   Damageradius like seen in Gasnades für players.
Reply With Quote #1

Hi!

I need a little help with my plugin.

I want a player to glow yellow and do 5dmg per second to alle players next to him (radius like grenade).

glowing is no problem^^
but how do i make him damage to outer players in his radius?

thx
__________________
Quote:
Originally Posted by Johnny got his gun
Read the plugin posting rules. They apply to everyone, including you.
kk...
#include <noizza>
lol

try my Server!
193.53.80.122:27016 Super-Fun Server [SHmod+DM]
Noizza is offline
Send a message via ICQ to Noizza
Ryu2877
Member
Join Date: Sep 2006
Location: China
Old 02-15-2007 , 23:33   Re: Damageradius like seen in Gasnades für players.
Reply With Quote #2

personal idea
1) create a invisible enitity, solid_trigger
2) set it's size to fit the "radius"
3) set it's origin to the player's origin & set it follow "the player"(movetype_follow)
4) when other players touch the created entity, use some trace-line to filtrate "wall" | "water" etc, then the residual status is been "hurt", just make "fakedamage" to them
5) if you want damage per some seconds, chang some param of the created entity by every "think" of it(through set the created entity's "nextthink" by your custom time), or simply use loop task
sorry for my bad English.
Ryu2877 is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-16-2007 , 00:21   Re: Damageradius like seen in Gasnades für players.
Reply With Quote #3

Engine:
Code:
new ent, Float:origin[3], Float:radius = 256.0; entity_get_vector(id,EV_VEC_origin,origin); while((ent = find_ent_in_sphere(ent,origin,radius)) != 0) {      if(!is_user_connected(ent))           continue;      // damage "ent" here }

Fakemeta:
Code:
new ent, Float:origin[3], Float:radius = 256.0; pev(id,pev_origin,origin); while((ent = engfunc(EngFunc_FindEntityInSphere,ent,origin,radius)) != 0) {      if(!is_user_connected(ent))           continue;      // damage "ent" here }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Noizza
Senior Member
Join Date: Apr 2004
Location: Vienna (PROUD)
Old 02-16-2007 , 19:32   Re: Damageradius like seen in Gasnades für players.
Reply With Quote #4

Thank you!

But...
I startet coding this plugin 2004....
I found it yesterday an looked at its code...
The i realized that i´ve forgot everything i know about coding plugins ;)

So your answer IS really helpful, BUT i dont know how i put this into my plugin ;)

this is my code so far...

Code:
public racost(id) {
	if(!is_user_alive(id))
		{
		client_print(id,print_chat,"[BCM] Tote Menschen brauchen kein Uran^^.")
		return PLUGIN_HANDLED
	}
	new money,cost
	money = cs_get_user_money(id)
	cost = get_cvar_num("buy_racost")
	if( money < cost) {
		client_print(id,print_chat,"[BCM] Du hast nicht genug Geld. Der Cheat kostet: $%i",cost)
		return PLUGIN_HANDLED
	}
	if( money > cost) {
		new money,cost
		money = cs_get_user_money(id)
		cost = get_cvar_num("buy_racost")
		new name[35]
		
		get_user_name(id,name,34)
		client_print(0,print_chat,"[BCM] %s ist radioaktiv verseucht!",name)
		cs_set_user_money(id,(money - cost),1)
		set_user_rendering(id,kRenderFxGlowShell,255,255,0,kRenderNormal,25)
	}
	return PLUGIN_HANDLED
}
__________________
Quote:
Originally Posted by Johnny got his gun
Read the plugin posting rules. They apply to everyone, including you.
kk...
#include <noizza>
lol

try my Server!
193.53.80.122:27016 Super-Fun Server [SHmod+DM]
Noizza is offline
Send a message via ICQ to Noizza
Reply



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 03:46.


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