Raised This Month: $ Target: $400
 0% 

Index out of bounds question


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
EDUTz
Senior Member
Join Date: Jun 2010
Location: Dracula's Homeland
Old 01-10-2013 , 11:49   Re: Index out of bounds question
Reply With Quote #3

yes, indeed. It's used in a npc plugin, but the awkward thing is that the npc shouldn't take damage to himself.

Code:
public TakeDamage(victim, weapon, attacker, Float:damage, damagetype) {
	static ClassName[32]
	pev(victim, pev_classname, ClassName, charsmax(ClassName))
	if (equal(ClassName, "NPC")) {
		pev(victim, pev_health, g_Health)
		UserDamage[attacker] += damage;
		blablabla ......

Last edited by EDUTz; 01-10-2013 at 11:50.
EDUTz is offline
 



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 13:22.


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