SetupSpeedCamera(CamID, Float, Float:y, Float:z, Float:rot, MaxSpeed) { ACameras[CamID][CamX] = x; ACameras[CamID][CamY] = y; ACameras[CamID][CamZ] = z; ACameras[CamID][CamAngle] = rot; ACameras[CamID][CamSpeed] = MaxSpeed; ACameras[CamID][CamObj1] = CreateObject(18880, x, y, z, 0.0, 0.0, rot); ACameras[CamID][CamObj2] = CreateObject(18880, x, y, z, 0.0, 0.0, rot + 180.0); } |
SetupSpeedCamera(CamID, Float:x, Float:y, Float:z, Float:rot, MaxSpeed)
{
new MsgRadar[128];
// Store all the given values
ACameras[CamID][CamX] = x;
ACameras[CamID][CamY] = y;
ACameras[CamID][CamZ] = z;
ACameras[CamID][CamAngle] = rot;
ACameras[CamID][CamSpeed] = MaxSpeed;
// Create both camera objects and store their reference
ACameras[CamID][CamObj1] = CreateObject(18880, x, y, z, 0.0, 0.0, rot);
ACameras[CamID][CamObj2] = CreateObject(18880, x, y, z, 0.0, 0.0, rot + 180.0);
format(MsgRadar, sizeof(MsgRadar), "{FF0000}Vel. Max\n{FFFFFF}%i {FF0000}Km/h.", MaxSpeed);
ACameras[CamID][CamObj4] = Create3DTextLabel(MsgRadar, -1, x, y, z + 4.2, 150.0, 0, 0);
}