Created
June 18, 2021 00:39
-
-
Save MrDave1999/b5df8d10ff5e46d14cd6bde4daa46ea5 to your computer and use it in GitHub Desktop.
RawData to CreateObject Converter for SA-MP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string[] files = Directory.GetFiles("rawdata"); | |
foreach(string file in files) | |
{ | |
string[] lines = File.ReadAllLines(file); | |
for(int i = 0, len = lines.Length; i < len; ++i) | |
lines[i] = "CreateObject(" + lines[i] + ");"; | |
string namefile = Path.GetFileName(file); | |
File.WriteAllLines("object/object_" + namefile, lines); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment