Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help ServerClient.Other
#1
Please tell me what the default values:

Health

SpeedScale

What range of values can be set?
Reply

#2
Health:
- Normal: 100
- Hardcore: 30

Speedscale:
There is no default value it depends on the weapon you are carrying (SMG, LMG, Assault, Scope etc.)

The range is the valid range for the type (int and float).
[Image: azuw.jpg]
Reply

#3
(04-16-2012, 07:08)zxz0O0 Wrote: Health:
- Normal: 100
- Hardcore: 30

Speedscale:
There is no default value it depends on the weapon you are carrying (SMG, LMG, Assault, Scope etc.)

The range is the valid range for the type (int and float).

Thank you very much
Reply

#4
(04-16-2012, 07:27)litgar Wrote:
(04-16-2012, 07:08)zxz0O0 Wrote: Health:
- Normal: 100
- Hardcore: 30

Speedscale:
There is no default value it depends on the weapon you are carrying (SMG, LMG, Assault, Scope etc.)

The range is the valid range for the type (int and float).

Thank you very much

LMG is like 0.8, SMG is like 1.2, it's around 1.0
[Image: MaEIQ.png]
Reply

#5
(04-16-2012, 08:24)Pozzuh Wrote:
(04-16-2012, 07:27)litgar Wrote:
(04-16-2012, 07:08)zxz0O0 Wrote: Health:
- Normal: 100
- Hardcore: 30

Speedscale:
There is no default value it depends on the weapon you are carrying (SMG, LMG, Assault, Scope etc.)

The range is the valid range for the type (int and float).

Thank you very much

LMG is like 0.8, SMG is like 1.2, it's around 1.0
Thank you! this is exactly what I need!

but I'm typing
Client.Other.SpeedScale = 1.0;
displays an error

what am I doing wrong?
Reply

#6
Next time, it would be useful for you to give us the error you're getting. But to fix your error you need to do
Code:
Client.Other.SpeedScale = 1.0f;
[Image: MaEIQ.png]
Reply

#7
I understand, thank you
PHP Code:
using System;
using Addon;
using System.Threading;

namespace 
Health_for_Zombies
{
    public class 
Health_for_Zombies CPlugin
    
{
        public 
override void OnServerLoad()
        {
            
ServerPrint("Health_for_Zombies plugin by Litgar loaded!");
        }

        public 
override void OnPlayerSpawned(ServerClient Client)
        {
           if (
Client.Team == Teams.Axis)
            {
                
Client.Other.Health 200;
                
Client.Other.SpeedScale 2.0f;
            }
            if (
Client.Team == Teams.Allies)
            {
                
Client.Other.Health 100;
                
Client.Other.SpeedScale 1.0f;
                }
        
        }
    }


Speed is not set for the players! What am I doing wrong?
Sorry but I write all the code for the first time in my life))
Reply

#8
The speed resets after changing weapon so maybe put it in OnWeaponChange.
[Image: azuw.jpg]
Reply

#9
(04-16-2012, 09:42)zxz0O0 Wrote: The speed resets after changing weapon so maybe put it in OnWeaponChange.

Thank you! I will try!
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Request] ServerClient.Origin archit 4 3,561 09-19-2012, 01:35
Last Post: DidUknowiPwn
  Help How to know weapon's base ServerClient.Ammo.PrimaryAmmoClip narkos 3 2,729 07-18-2012, 16:42
Last Post: narkos

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.