Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Include "gtassistant.bi"
- dim as FB.IMAGE ptr Arial(191),ArialRed(191)
- dim as FB.IMAGE ptr GTA(191)
- Dim As Integer count,id,scroll,renderthreads,quitkey,mx,my,mwheel,mbutton,key,mblurt,selid,iselector,linecount
- Dim As String modname(1000),modauthor(1000),modtags(1000),ids,keys,lfilter,linebuffer,launcherpath
- ScreenRes 200,300,32,,8 Or &h20
- ChDir ExePath
- Kill ExePath+"/list.txt"
- Kill "list.txt"
- count = 21
- iselector = -1
- gfx.font.loadttf( "#arial.ttf",Arial(count),,,count )
- gfx.font.loadttf( "GTA.ttf",GTA(36),,,36 )
- draw string (12,120), "GTAssistant", ,GTA(36), Alpha
- draw string (70,200), "Loading...", ,Arial(21), Alpha
- draw string (10,280), "Made by PexingYT", ,Arial(21), Alpha
- Print "Cleaning up cache..."
- Do
- Print Dir()
- count=count + 1
- sleep
- Loop Until count >= 100
- sleep
- count = 0
- lfilter = "GTAVLauncher (GTAVLauncher.EXE)" + Chr(0) + "GTAVLauncher.EXE" + Chr(0, 0)
- ChDir Exepath
- Name("list.txt","oldlist.txt")
- Sleep 1000,1
- downloadfromweb("http://loudplay.de/gtasisstant/mods/list.txt",ExePath+"/list.txt")
- Print ExePath
- If FileExists(ExePath+"/gtalauncher.txt") Then
- Print "Launcher found"
- Open ExePath+"/gtalauncher.txt" For Input As #2
- Line Input #2, launcherpath
- Close #2
- Else
- launcherpath = LoadSaveDialog(0,lfilter,0,"C:/","")
- Open ExePath+"/gtalauncher.txt" For Output As #2
- Print #2, launcherpath
- Close #2
- EndIf
- ChDir ExePath
- count = 0
- Do
- count = count + 2
- gfx.font.loadttf( "#arial.ttf",Arial(count),,,count )
- Sleep 1,1
- Loop Until count >=92
- count = 0
- Do
- count = count + 2
- gfx.font.loadttf( "#arial.ttf",ArialRed(count),,,count,RGB(255,0,0) )
- Sleep 1,1
- Loop Until count >=92
- count = 0
- Do
- count = count + 2
- gfx.font.loadttf( "GTA.ttf",GTA(count),,,count )
- Sleep 1,1
- Loop Until count >=92
- ScreenRes 1280,720,32,,&h20
- renderthreads = 90
- Do
- GetMouse (mx,my,mwheel,mbutton)
- If mwheel > 0 Then
- mwheel = 0
- EndIf
- If mx>0 Then
- scroll = mwheel * 20
- End If
- ScreenLock
- If mblurt = 2 Then
- mblurt = 0
- Line(0,61)-(399,720),RGB(0,0,0),BF
- If iselector <> -1 Then
- Line(0,(id*100+iselector+60)-100)-(400,iselector*100+scroll+60),RGB(40,40,60),BF
- EndIf
- EndIf
- Open "list.txt" For Input As #4
- Do
- Line Input #4, ids
- id = Val(ids)
- Line Input #4, modname(id)
- Line Input #4, modauthor(id)
- Line Input #4, modtags(id)
- Line(0,id*100+scroll+60)-(400,id*100+scroll+60),RGB(40,40,60)
- draw string (5,(id*100+scroll+60)-100), modname(id), ,GTA(40), Alpha
- draw string (5,(id*100+scroll+60)-68), modauthor(id), ,GTA(22), Alpha
- draw string (5,(id*100+scroll+60)-22), modtags(id), ,GTA(24), Alpha
- Loop Until Eof(4) Or id*100+scroll*20>720
- Line(0,60)-(1280,60),RGB(255,255,255)
- If renderthreads = 90 Then
- Line(401,61)-(1280,720),RGB(0,0,0),BF
- If iselector <> -1 Then
- Line(0,(id*100+iselector+60)-100)-(400,iselector*100+scroll+60),RGB(100,100,100),BF
- draw string (410,60), modname(iselector), ,GTA(60), Alpha
- draw string (5,(id*100+scroll+60)-100), modname(id), ,GTA(40), Alpha
- draw string (5,(id*100+scroll+60)-68), modauthor(id), ,GTA(22), Alpha
- draw string (5,(id*100+scroll+60)-22), modtags(id), ,GTA(24), Alpha
- ChDir ExePath
- draw string (410,115+linecount*21), "Downloading info from Server...", &hFF0000,Arial(20), Alpha
- Kill Str(iselector)+".desc.txt"
- DownloadFile("http://loudplay.de/gtasisstant/mods/"+Str(iselector)+"/desc.txt",Str(iselector)+".desc.txt")
- Kill Str(iselector)+".requirements.txt"
- DownloadFile("http://loudplay.de/gtasisstant/mods/"+Str(iselector)+"/requirements.txt",Str(iselector)+".requirements.txt")
- Open Str(iselector)+".desc.txt" For Input As #1
- Open Str(iselector)+".requirements.txt" For Input As #2
- linecount = 0
- linebuffer = ""
- Line(401,61)-(1280,720),RGB(0,0,0),BF
- draw string (410,60), modname(iselector), ,GTA(60), Alpha
- Do
- Line Input #1, linebuffer
- draw string (410,115+linecount*21), linebuffer, ,Arial(20), Alpha
- linecount = linecount + 1
- Loop Until Eof(1)
- linecount = linecount + 1
- linebuffer = ""
- Do
- Line Input #2, linebuffer
- draw string (410,115+linecount*21), linebuffer,&hFF0000,ArialRed(20), Alpha
- linecount = linecount + 1
- Loop Until Eof(2)
- Close #1
- Close #2
- draw string (1040,670), "Play with Mod", ,GTA(40), Alpha
- EndIf
- Line(0,0)-(1280,59),RGB(0,0,0),BF
- draw string (480,-18), "GTAssistant", ,GTA(80), Alpha
- renderthreads = 0
- Else
- Line(0,0)-(400,59),RGB(0,0,0),BF
- End if
- Line(400,60)-(400,720),RGB(255,255,255)
- If mbutton = 1 Then
- If mx<401 And mx>-1 Then
- selid = Val(Mid(Str((my-60-scroll)/100),1,1))
- selid = selid + 1
- If modname(selid) <> "" Then
- iselector = selid
- renderthreads = 89
- EndIf
- End If
- If mx>1039 And my>669 And mx<1280 And my<720 And mbutton = 1 And iselector <> -1 Then
- LaunchMod(iselector,launcherpath)
- EndIf
- EndIf
- Close #4
- ScreenUnLock
- keys=InKey()
- If keys = Chr(255)+"k" Then
- quitkey = 1
- EndIf
- Sleep 1,1
- renderthreads = renderthreads + 1
- mblurt = mblurt + 1
- Loop Until quitkey = 1
- ChDir exepath
- Kill "list.txt"
- Open "list.txt" For Output As #2
- Print #2, ""
- Close #2
- Kill "list.txt"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement