13.11.2011, 15:42
pawn Код:
CMD:gate(playerid, params[])
{
static Float:degree, GateOpen;
degree = 0.5;
while(degree > 360.0) degree -= 360.0;
while(degree < 0.0) degree += 360.0;
if(PlayerInfo[playerid][pTeam] == 6)
{
if(GateOpen == 1)
{
MoveDynamicObject(ObjClosed, -85.40625000,-1120.18261719, degree, 0.5);
//SetDynamicObjectRot(ObjClosed, -85.40625000,-1120.18261719, degree);
GateOpen = 0;
}
else if(GateOpen == 0)
{
MoveDynamicObject(ObjClosed, -85.40692139,-1120.18322754, degree, 0.5);
//SetDynamicObjectRot(ObjClosed, 0.0, 0.0, degree);
GateOpen = 1;
}
}
else
{
SendClientMessage(playerid, COLOR_ORANGE, "INFO: {FFFFFF}You are not an Courier.");
}
return 1;
}