How I can check if a player death in a gang zone?
#1

How I can check if a player death in a gang zone? I know how to use but in OnPlayerDeath Dont work, WHY?



Please help me... Thanks for all....
Reply
#2

Use IsPlayerInArea
Reply
#3

Add this into your script and use the same Float's as in with your gangzone:
Код:
IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
	new Float:x, Float:y, Float:z;
	GetPlayerPos(playerid, x, y, z);
	if (x > minx && x < maxx && y > miny && y < maxy) return 1;
	return 0;
}
Example, with guessing you have gangzone created already:

Код:
GangZoneCreate(100, 300, 500, 400);

public OnPlayerDeath(playerid, killerid, reason)
{
 IsPlayerInArea(playerid, 100, 500, 300, 400);
 {
   // do something maybe :o
 }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)