- เครดิต
- 3253
- ความรู้
-
- เงิน $
-
- ความดี
-
|
นี่ครับ โค๊ด
Imports System.IO
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox1.Text = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software\SAMP", "PlayerName", Nothing)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Not File.Exists("samp.exe") Or Not File.Exists("models/gta3.img") Or Not File.Exists("gta_sa.exe") Then
MsgBox("Start Game GTA San Andreas / File samp.exe / File gta_sa.exe", MsgBoxStyle.OkOnly, Nothing)
Me.Close()
Else
If File.Exists((Application.StartupPath & "\d3d9.dll")) Then
My.Computer.FileSystem.DeleteFile((Application.StartupPath & "\d3d9.dll"))
End If
If File.Exists((Application.StartupPath & "\data\carmods.two")) Then
My.Computer.FileSystem.DeleteFile((Application.StartupPath & "\data\carmods.two"))
End If
If File.Exists((Application.StartupPath & "\data\default.two")) Then
My.Computer.FileSystem.DeleteFile((Application.StartupPath & "\data\default.two"))
End If
If File.Exists((Application.StartupPath & "\data\HANDLING.two")) Then
My.Computer.FileSystem.DeleteFile((Application.StartupPath & "\data\HANDLING.two"))
End If
If File.Exists((Application.StartupPath & "\data\SHOPPING.two")) Then
My.Computer.FileSystem.DeleteFile((Application.StartupPath & "\data\SHOPPING.two"))
End If
If File.Exists((Application.StartupPath & "\data\surface.two")) Then
My.Computer.FileSystem.DeleteFile((Application.StartupPath & "\data\surface.two"))
End If
If File.Exists((Application.StartupPath & "\data\timecyc.two")) Then
My.Computer.FileSystem.DeleteFile((Application.StartupPath & "\data\timecyc.two"))
End If
If File.Exists((Application.StartupPath & "\data\VEHICLES.two")) Then
My.Computer.FileSystem.DeleteFile((Application.StartupPath & "\data\VEHICLES.two"))
End If
If File.Exists((Application.StartupPath & "\m0d_s0beit_sa.ini")) Then
My.Computer.FileSystem.DeleteFile((Application.StartupPath & "\m0d_s0beit_sa.ini"))
End If
If File.Exists((Application.StartupPath & "\m0d_s0beit_sa.raw")) Then
My.Computer.FileSystem.DeleteFile((Application.StartupPath & "\m0d_s0beit_sa.raw"))
End If
If File.Exists((Application.StartupPath & "\m0d_s0beit_chatbox.log")) Then
My.Computer.FileSystem.DeleteFile((Application.StartupPath & "\m0d_s0beit_chatbox.log"))
End If
If File.Exists((Application.StartupPath & "\Uninstall.ini")) Then
My.Computer.FileSystem.DeleteFile((Application.StartupPath & "\Uninstall.ini"))
End If
If File.Exists((Application.StartupPath & "\m0d_s0beit_sa.raw")) Then
My.Computer.FileSystem.DeleteFile((Application.StartupPath & "\m0d_s0beit_sa.raw"))
End If
If File.Exists((Application.StartupPath & "\m0d_s0beit_sa_setup.log")) Then
My.Computer.FileSystem.DeleteFile((Application.StartupPath & "\m0d_s0beit_sa_setup.log"))
End If
If File.Exists((Application.StartupPath & "\needle.png")) Then
My.Computer.FileSystem.DeleteFile((Application.StartupPath & "\needle.png"))
End If
If File.Exists((Application.StartupPath & "\speedo.png")) Then
My.Computer.FileSystem.DeleteFile((Application.StartupPath & "\speedo.png"))
End If
If File.Exists((Application.StartupPath & "\Uninstall_mod_sa.exe")) Then
My.Computer.FileSystem.DeleteFile((Application.StartupPath & "\Uninstall_mod_sa.exe"))
End If
Shell("samp.exe ip:port passwordserver")
End If
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Software\SAMP", "PlayerName", Me.TextBox1.Text)
End Sub
End Class
//แก้ไขตรง Shell("samp.exe ip:port passwordserver") เช่น Shell("samp.exe 127.0.0.1:3310") |
|