12.09.2014, 07:15
pawn Код:
public OnGameModeInit()
{
for (new CamID; CamID < MAX_CAMERAS; CamID++)
{
if(fexist(Camera_Path(CamID)))
{
INI_ParseFile(Camera_Path(CamID), "LoadCamera_%s", .bExtra = true, .extra = CamID);
gCameras[CamID][SpeedText] = Create3DTextLabel(cam_text, YELLOW, x, y, z + 2.3, 80.0,0);
gCameras[CamID][CamObj1] = CreateDynamicObject(3335, x, y, z, 0.0, 0.0, rot);
gCameras[CamID][CamObj2] = CreateDynamicObject(3335, x, y, z, 0.0, 0.0, rot + 180.0);
}
}
}
forward LoadCamera_data(CamID, name[], value[]);
public LoadCamera_data(CamID, name[], value[])
{
INI_Float("CamX", gCameras[CamID][CamX]);
INI_Float("CamY", gCameras[CamID][CamY]);
INI_Float("CamZ", gCameras[CamID][CamZ]);
INI_Float("CamAngle", gCameras[CamID][CamAngle]);
INI_Int("CamSpeed", gCameras[CamID][CamSpeed]);
return 1;
}