loadlines(str) savelines(str, int)
Where str is the file and int is 0 (overwrite) or 1 (append).
They load as an array.
For your guild example:
PHP Code:
function onActionServerside() {
temp.guild.loadlines("levels/guilds/guildSexy_Time.txt");
for (i=0; i<temp.guild.size(); i++) {
if (player.account in temp.guild[i].tokenize(":")[0]) {
player.chat = "I'm in the guild dur.";
return;
}
}
temp.guild.add(player.account@ ":" @player.nick);
temp.guild.savelines("levels/guilds/guildSexy_Time.txt", 0);
player.chat = "I'm now in (Sexy Time) as " @player.nick@ ".";
}
//#CLIENTSIDE
function onPlayerChats() {
if (player.chat == "guild me baby") {
triggerserver("gui", this.name, null);
}
}
There's also loadstring(str) savestring(str, int) loadvars(str) savevars(str) with the same parameters for the load and save, except ...sting is for a string and ...vars is for variables, so you need to make whatever var you work with a TStaticVar.
http://graal.net/index.php/Creation/...adstring.28.29