04-16-2012, 03:47
04-16-2012, 07:08
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).
- 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:27
(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, 08:24
(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:32
(04-16-2012, 08:24)Pozzuh Wrote: [ -> ]Thank you! this is exactly what I need!(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
but I'm typing
Client.Other.SpeedScale = 1.0;
displays an error
what am I doing wrong?
04-16-2012, 09:04
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;
04-16-2012, 09:14
I understand, thank you
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))
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))
04-16-2012, 09:42
The speed resets after changing weapon so maybe put it in OnWeaponChange.
04-16-2012, 10:10
(04-16-2012, 09:42)zxz0O0 Wrote: [ -> ]The speed resets after changing weapon so maybe put it in OnWeaponChange.
Thank you! I will try!