Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Importing [ System.Threading - System.Text ] ~>
- Imports System.Threading
- Imports System.Text
- Public Class Form1
- '[#] /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ [#]
- '/// Ghosts GameMode v1 \\\
- '/// This tool has been made by \\\
- '/// Black Skull \\\
- '/// Skype : iBlackSkull \\\
- '/// YouTube - www.youtube.com/user/lblackskull \\\
- '[#] /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ [#]
- 'Declaring [ ProcessID - Target ] ~>
- Private Shared ProcessID As UInt32
- Private Const Target As Integer = 0
- Private Sub ConnectAttachBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ConnectAttachBtn.Click
- 'Connect & Attach ~>
- Try
- Dim BlackSkull() As UInt32 = Nothing
- PS3TMAPI.InitTargetComms()
- PS3TMAPI.Connect(0, Nothing)
- PS3TMAPI.GetProcessList(0, BlackSkull)
- ProcessID = Convert.ToUInt32(BlackSkull(0))
- PS3TMAPI.ProcessAttach(0, PS3TMAPI.UnitType.PPU, ProcessID)
- PS3TMAPI.ProcessContinue(0, ProcessID)
- 'Initializing RPC ~>
- GHOSTS.RPC.Init()
- MsgBox("PS3 Connected and Attached", MsgBoxStyle.Information, "Success!")
- Catch
- MsgBox("PS3 can't Attach or connect to your PS3!", MsgBoxStyle.Critical, "Fail..!")
- End Try
- End Sub
- '[ SV_GameSendServerCommand - iPrintln - iPrintlnBold ] functions ~>
- Public Shared Sub iPrintln(ByVal ClientID As Integer, ByVal Message As String)
- SV_GameSendServerCommand(ClientID, "e """ & Message & """")
- End Sub
- Public Shared Sub iPrintlnBold(ByVal ClientID As Integer, ByVal Message As String)
- SV_GameSendServerCommand(ClientID, "c """ & Message & """")
- End Sub
- Public Shared Sub SV_GameSendServerCommand(ByVal ClientID As Integer, ByVal Command As String)
- GHOSTS.RPC.[Call](&H681434, ClientID, 0, Command)
- End Sub
- '[ Set/GetMemory - Getting Player Name - Getting Valid Player ] functions
- Public Shared Sub GetMemory(ByVal offset As UInteger, ByRef bytes() As Byte)
- PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, ProcessID, 0L, CULng(offset), bytes)
- End Sub
- Public Shared Sub SetMemory(ByVal Offset As UInteger, ByVal bytes() As Byte)
- PS3TMAPI.ProcessSetMemory(0, PS3TMAPI.UnitType.PPU, ProcessID, 0L, CULng(Offset), bytes)
- End Sub
- Public Shared Function GetPlayerName(ByVal ClientID As Integer) As String
- Dim bytes As Byte() = New Byte(0) {}
- Dim num As UInteger = 0
- Dim list As New List(Of Byte)()
- While True
- GetMemory(&HF47F9C + (ClientID * &H3700) + num, bytes)
- If bytes(0) = 0 Then
- Exit While
- End If
- list.Add(bytes(0))
- num += 1
- End While
- Dim encoding As New UTF8Encoding()
- Return encoding.GetString(list.ToArray())
- End Function
- Public Shared Function GetValidPlayer(ByVal ClientID As Integer) As Boolean
- Return GetPlayerName(ClientID) <> ""
- End Function
- 'Declare the selected player as an integer ~>
- Private Shared SelectedClient As Integer
- 'Declare Random_ as a Random ~>
- Private Shared Random_ As New Random
- 'Declare the time as an integer ~>
- Private Shared Time As Integer
- 'Declare Abort as boolean and initializing it with True
- Private Shared Abort As Boolean = True
- 'Countdown and player selecting function ~>
- Public Shared Sub CountDownAndSelectPlayer(ByVal Time As Integer)
- 'Start Abort loop ~>
- Do While Abort = False
- 'Start the countdown loop ~>
- While Time > 0
- 'Time decreases by 1 ~>
- Time -= 1
- 'Printing in the countdown ~>
- iPrintlnBold(-1, "Game Will Start After : ^2" & Time & " ^7Seconds")
- 'System Sleeps for 1 second ~>
- Thread.Sleep(1000)
- 'Ending the loop ~>
- End While
- 'Assigning the selected player variable ~>
- SelectedClient = Random_.Next(0, 11)
- 'Getting a valid Player loop ~>
- Do Until GetValidPlayer(SelectedClient) = True
- SelectedClient = Random_.Next(0, 11)
- 'Ending the loop ~>
- Loop
- 'Printing in the The selected player ~>
- iPrintln(SelectedClient, "^1YOU ARE THE SELECTED PLAYER !!")
- iPrintlnBold(-1, GetPlayerName(SelectedClient) & " Is The Sellected Player ! ")
- SetModel(SelectedClient)
- 'Ending Abort loop ~>
- Loop
- End Sub
- Private Sub StartGameModeBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StartGameModeBtn.Click
- 'Start GameMode with 10 seconds ~>
- CountDownAndSelectPlayer(10)
- End Sub
- Private Sub StopGameMode_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StopGameMode.Click
- 'Stop GameMode ~>
- Abort = True
- End Sub
- 'Set Meodel function ~>
- Public Shared Sub SetModel(ByVal ClientID As Integer)
- GHOSTS.RPC.Call(&H28F95C, &HE04F00 + (ClientID * 640), "com_plasticcase_green_big_us_dirt")
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement