Raised This Month: $ Target: $400
 0% 

Solved [edit] no kill zones to heal zones


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Meelo
Member
Join Date: Aug 2010
Old 06-09-2019 , 12:14   [edit] no kill zones to heal zones
Reply With Quote #1

Hello, im trying to edit this plugin but there is a problem i can't solve.. so i need to create zone and if someone enter in, it will heal him for 'x' hp.

i did change public player_damage and player_traceattack from original to:

Code:
public dmg()
{
	for(new i; i<g_iZonesNum; i++)
	{
		if(is_user_in_zone(i,i))
		{

			set_user_health((i),get_user_health(i)+5) 

		}
	}
}
and in plugin_init
set_task(1.0, "dmg", .flags="b")

the problem is - it works only for the first player on the map who will enter into created zone, i can't solve it by myself :/
Attached Files
File Type: sma Get Plugin or Get Source (nkzpl.sma - 198 views - 11.1 KB)
File Type: sma Get Plugin or Get Source (nkzpl_edit.sma - 174 views - 11.1 KB)

Last edited by Meelo; 06-09-2019 at 17:33.
Meelo is offline
 


Thread Tools
Display Modes

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 17:15.


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