View Single Post
  #1  
Old 03-12-2010, 04:59 PM
Imperialistic Imperialistic is offline
graal player lord
Imperialistic's Avatar
Join Date: Apr 2007
Location: Florida
Posts: 1,094
Imperialistic is a jewel in the roughImperialistic is a jewel in the rough
TStaticVar Output Methods

With a little help from DrakilorP2P I created just a script that I'm actually proud of (NOT A SCRIPTER).

Was curious if there was any other easier methods or ways you could handle it?

PHP Code:
function onActionServerSide()
{
  if (
params[0] == "printMyVariable") {
    
myNewVar.loadvars("levels/users/Imperialistic/other/imptest.txt");
    
temp.theVariable base64decode(myNewVar.variable);
    
//echo("Loaded ---> " @ temp.theVariable);
    
findplayer("Imperialistic").sendPM(temp.theVariable);     
  }
  
 if (
params[0] == "saveMyVariable") {
 
myVar = new TStaticVar();
 
myVar.variable params[1];
 
//myVar.secondvariable = "World";
 
myVar.variable base64encode(myVar.variable);
 
myVar.saveVars("levels/users/Imperialistic/other/imptest.txt"1);
 } 
}
 
//#CLIENTSIDE
function onPlayerChats(){
 if (
player.chat ":load"){
      
triggerServer("gui"this.name"printMyVariable");
    }
if (
player.chat.starts("/save")) {
      
temp.argument player.chat.substring(5).trim();
      
temp.arguments temp.argument.tokenize();
      
triggerServer("gui"this.name"saveMyVariable"temp.argument);
  }
 } 
__________________
" It's been swell, but the swelling's gone down. "
Reply With Quote