Gate command
#4

Код:
   	
if (strcmp(cmdtext, "/side2",true)==0)
        {
new Float:x, Float:y, Float:z;
GetObjectPos(sidegate, x, y, z);
new intx, inty, intz;
intx = floatround(x * 100, FLOATROUND_ROUND);
inty = floatround(y * 100, FLOATROUND_ROUND);
intz = floatround(z * 100, FLOATROUND_ROUND);
if (x == openxpos && y == openypos && z == openzpos)
{
        MoveObject(sidegate, 2898.43139648,2132.76831055,13.79024315, 2.500000);
}
else if (intx == 2898431 && inty == 2132768 && intz == 13790)
{
MoveObject(sidegate, openxpos, openypos, openzpos, 2.500000);
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "Gate is in motion");
        return 1;
        }
the rounding stuff is because you have too many decimals, and I am afraid it won't equal that exact number.
Reply


Messages In This Thread
Gate command - by Hobod - 04.08.2010, 01:09
Re: Gate command - by cofy1 - 04.08.2010, 01:25
Re: Gate command - by Hobod - 04.08.2010, 01:31
Re: Gate command - by Daren_Jacobson - 04.08.2010, 01:37
Re: Gate command - by Hobod - 04.08.2010, 12:44
Re: Gate command - by Ash. - 04.08.2010, 13:02
Re: Gate command - by Hobod - 04.08.2010, 17:37
Re: Gate command - by Daren_Jacobson - 04.08.2010, 18:00
Re: Gate command - by Hobod - 04.08.2010, 20:41
Re: Gate command - by JaTochNietDan - 04.08.2010, 21:36

Forum Jump:


Users browsing this thread: 2 Guest(s)