Raised This Month: $ Target: $400
 0% 

Radius_Damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dutchmeat
Senior Member
Join Date: Sep 2006
Old 01-31-2007 , 16:37   Re: Radius_Damage
Reply With Quote #1

Code:
public radiusdamage(id){
new origin[3]
new damage = 50 //50 hp damage
new radius = 100 //radius is within 100 units
get_user_origin(id,origin)
radius_damage(origin,75,35)
}
Note that if it kills a person then the kill will show as suicide.
So the function i would use is this:
Code:
public radiusdamage(id){ new pnum = get_playersnum() for(new a = 1; a <= pnum; a++) { if(userinradius(a,id)){ console_print(a,"you are in the radius!") } } } public userinradius(a,id){ new distanceBetween new origin1[3], origin[3] new dmgRadius = 100 get_user_origin(id, origin) if ( is_user_alive(a) && a != id) { get_user_origin(a, origin1) distanceBetween = get_distance(origin, origin1) if ( distanceBetween < dmgRadius ) { return 1 } } return 0 }

This way, you can determine your own deathmessage.
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
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 00:38.


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