View Single Post
  #2  
Old 10-14-2009, 04:27 AM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
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=0i<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.namenull);
  }

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
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.

Last edited by Switch; 10-14-2009 at 04:37 AM..
Reply With Quote