Problem with IsPlayerInCube
#1

Well this is the script
Код:
stock IsPlayerInCube(playerid, Float:xmin, Float:ymin, Float:zmin, Float:xmax, Float:ymax, Float:zmax)
{
	new Float:x, Float:y, Float:z;
	GetPlayerPos(playerid, x, y, z);
	if(x > xmin && y > ymin && z > zmin && x < xmax && y < ymax && z < zmax)return 1;
	return 0;
}
Код:
 
public Mine()
{
for(new i=0; i<=MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInCube(i, 72.1256, 1544.2145, 15.7742, 75.2350, 1546.3352, 16.4206)) 
{
new Float:posx, Float:posy, Float:posz;
GetPlayerPos(i, posx, posy, posz);
SetPlayerHealth(i, 0);
CreateExplosion(posx, posy, posz, 3, 5);
}
}
return 1;
}
But it doesn't work. And i know that the problem is the function IsPlayerInCube because if i use IsPlayerInRangeOfPoint instead of it it works without problems. Well the problem is that i can't use that because the bomb must be hidden under a bridge but it doesn't have to explode who is over the bridge. So the only way is to use IsPlayerInCube.
Reply


Messages In This Thread
Problem with IsPlayerInCube - by Loppa - 09.08.2010, 08:51
Re: Problem with IsPlayerInCube - by r0b - 09.08.2010, 09:02
Re: Problem with IsPlayerInCube - by Owenlishious - 11.09.2010, 22:45

Forum Jump:


Users browsing this thread: 3 Guest(s)