ItsMods

Full Version: ServerClient.Other
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Please tell me what the default values:

Health

SpeedScale

What range of values can be set?
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).
(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
(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
(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?
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;
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))
The speed resets after changing weapon so maybe put it in OnWeaponChange.
(04-16-2012, 09:42)zxz0O0 Wrote: [ -> ]The speed resets after changing weapon so maybe put it in OnWeaponChange.

Thank you! I will try!