Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

-R.o.x-

Members
  • Posts

    3
  • Joined

  • Last visited

    Never

-R.o.x-'s Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. @all Thanks for the feedback. I'll remove them/replace them later.
  2. Alright thanks. I'm pretty new to VB6, before that I always used VB.NET/LUA and C++(#) in MySQL/XML/DirectX and XNA uses. I never really had something with connections between client/server.
  3. Hey Guys, this is my first post in this forum :). Short description : This system shows a GUI if you died, where you have to stay for "x" seconds. While you are in the hospital you can't move. It's just usefull if you want to make your game more realistic. ![](http://fessifi.de/~nikeee/holzshare/images/zhn2ur.png) Scripting : Serverside modEnumerations _In Serverpackets over SMSG_Count insert:_ ``` hospitalEnter ``` modCombat _Search for :_ ``` If Damage >= GetPlayerVital(victim, Vitals.HP) Then ```_After this insert :_ ``` Dim Buffer2 As clsBuffer Set Buffer2 = New clsBuffer Buffer2.WriteLong hospitalEnter Buffer2.WriteString "isinhospital" SendDataTo victim, Buffer2.ToArray Set Buffer = Nothing ```**Notice that you'll get TWO results. Paste the code under BOTH.** Clientside modConstants _Insert this at the bottom :_ ``` Public isInHospital As Boolean ``` modHandleData _Insert this below Initmessages_ ``` HandleDataSub(hospitalEnter) = GetAddress(AddressOf HandleHospital) ``` _Insert this at the bottom :_ ``` Private Sub HandleHospital(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer As clsBuffer Dim Msg As String ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler Set Buffer = New clsBuffer Buffer.WriteBytes Data() Msg = Buffer.ReadString frmHospital.Show ' Error handler Exit Sub errorhandler: HandleError "HandleHospital", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` modInput _In checkInputKeys insert after_``` If GetKeyState(vbKeyUp) < 0 Then ```_this_ ``` If isInHospital = False Then ```_And before the last "End If"_ ``` End If ```Form-work: * Create a new form called 'frmHospital' * Create a timer called Timer1 * Create a label called lblTimer **Now you have to _view the code_ of frmHospital.** _Just insert this :_ ``` Dim TimeH As Integer Private Sub Form_Activate() TimeH = 30 'Here you can set the duration Timer1.Enabled = True lblTimer.Caption = "You are in the Hospital for : 30s" End Sub Private Sub Timer1_Timer() If TimeH > 0 Then TimeH = TimeH - 1 lblTimer.Caption = "You are in the Hospital for : " & TimeH & "s" isInHospital = True Else isInHospital = False Me.Hide End If End Sub ``` Credits : * Robin - Should be clear why * Me - For creating the script + posting I hope you can use it
×
×
  • Create New...