01.03.2014, 17:30
The doors aren't moving.
Anyone see what the error is? And the doors are indeed defined.
And yeah, it doesn't say that I am not in range of any, so that's not the problem neither.
Anyone see what the error is? And the doors are indeed defined.
pawn Код:
bcpddoor1 = CreateDynamicObject(1495, 755.86792, -1400.87695, 3000.06006, 0.00000, 0.00000, 180.00000);
bcpddoor2 = CreateDynamicObject(1495, 752.59412, -1400.57556, 3000.06006, 0.00000, 0.00000, 180.00000);
bcpddoor3 = CreateDynamicObject(1495, 747.84210, -1400.22693, 3000.06006, 0.00000, 0.00000, 90.00000);
pawn Код:
command(door, playerid, params[])
{
if(Player[playerid][Faction] == 1)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, 755.86792, -1400.87695, 3000.06006))
{
if(bcpd1 == 1)
{
MoveDynamicObject(bcpddoor1, 755.86792, -1400.87695, 3000.06006, 2.5, 0.00000, 0.00000, 180.00000);
bcpddoor1 = 0;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 752.59412, -1400.57556, 3000.06006))
{
if(bcpd2 == 1)
{
MoveDynamicObject(bcpddoor2, 752.59412, -1400.57556, 3000.06006, 0.00000, 0.00000, 180.00000);
}
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 747.84210, -1400.22693, 3000.06006))
{
if(bcpd3 == 1)
{
MoveDynamicObject(bcpddoor3, 747.84210, -1400.22693, 3000.06006, 0.00000, 0.00000, 90.00000);
}
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 755.86792, -1400.87695, 3000.06006))
{
if(bcpd1 == 0)
{
MoveDynamicObject(bcpddoor1, 755.86792, -1400.87695, 3000.06006, 0.00000, 0.00000, -90.00000);
}
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 752.59412, -1400.57556, 3000.06006))
{
if(bcpd2 == 0)
{
MoveDynamicObject(bcpddoor2, 752.59412, -1400.57556, 3000.06006, 0.00000, 0.00000, -90.00000);
}
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 747.84210, -1400.22693, 3000.06006))
{
if(bcpd3 == 0)
{
MoveDynamicObject(bcpddoor3, 747.84210, -1400.22693, 3000.06006, 0.00000, 0.00000, 180.00000);
}
}
else return SendClientMessage(playerid, GREY, "You are not in range of any doors you can open.");
}
else return SendClientMessage(playerid, GREY, FactionOnly);
return 1;
}