Hey, i didn't test it, but this script should draw a box in the top left corner with text in it:
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Collections.Generic;
using GTA;
namespace ExampleScripts {
public class TextInBoxExample : Script {
public TextureDrawingExample() {
PerFrameDrawing += new GTA.GraphicsEventHandler(TextureDrawingExample_PerFrameDrawing);
}
private void TextureDrawingExample_PerFrameDrawing(object sender, GTA.GraphicsEventArgs e) {
var g = e.Graphics;
g.Scaling = FontScaling.ScreenUnits;
// we use ScreenUnits, so 0.1 means width and height are both 10% of the screen.
var rect = new RectangleF(0f, 0f, 0.1f, 0.1f);
// draw base rectangle in white with 50% transparency
g.DrawRectangle(rect, Color.FromArgb(128, 255, 255, 255));
g.DrawText("Hey, this is the text that should appear inside the box!", rect,
TextAlignment.Top | TextAlignment.Left, Color.Black);
}
}
}
I'm not exactly sure what you want to know with your second question. What do you want to do exactly? Do you want to save values to disk to access them the next time you play, or do you want to save them to disk for testing purposes or something like that?
BTW: You'll have to register on the forum to reply, because guests can't write in the forum. But the forum is for discussions like these, while the blog comments are really just for comments on the blog.