0 Members and 1 Guest are viewing this topic.
procedure scripton(ID:integer; ScriptName: string);var s:string;begin if FileExists('scripts/scriptsmanager/includes/'+ScriptName+'.txt') then begin s:=readfile('scripts/scriptsmanager/includes/'+ScriptName+'.txt'); writefile('scripts/'+ScriptName+'/Includes.txt',s); command('/recompile '+ScriptName); end else WriteConsole(ID,'Script '+ScriptName+' doesn''t exist.',$EE00FF00); end;procedure scriptoff(ID:integer; ScriptName: string);var s:string;begin if FileExists('scripts/scriptsmanager/includes/'+ScriptName+'.txt') then begin writefile('scripts/'+ScriptName+'/Includes.txt',''); command('/recompile '+ScriptName); end else begin if FileExists('scripts/'+ScriptName+'/Includes.txt') then begin s:=readfile('scripts/'+ScriptName+'/Includes.txt'); writefile('scripts/scriptsmanager/includes/'+ScriptName+'.txt',s); writefile('scripts/'+ScriptName+'/Includes.txt',''); command('/recompile '+ScriptName); end else WriteConsole(ID,'Script '+ScriptName+' doesn''t exist.',$EE00FF00); end; end;
hmm o.O when you delete or rename the uncludes.txt and uploading another script and do /recompile you did the same... or i am wrong?