04-16-2012, 03:47
Please tell me what the default values:
Health
SpeedScale
What range of values can be set?
Health
SpeedScale
What range of values can be set?
|
Help ServerClient.Other
|
|
04-16-2012, 03:47
Please tell me what the default values:
Health SpeedScale What range of values can be set?
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).
04-16-2012, 07:27
(04-16-2012, 07:08)zxz0O0 Wrote: Health: Thank you very much
04-16-2012, 08:24
(04-16-2012, 07:27)litgar Wrote:(04-16-2012, 07:08)zxz0O0 Wrote: Health: LMG is like 0.8, SMG is like 1.2, it's around 1.0
04-16-2012, 08:32
(This post was last modified: 04-16-2012, 08:39 by [Z00MBY] Alex.)
(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: 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
(This post was last modified: 04-16-2012, 09:40 by [Z00MBY] Alex.)
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))
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! |
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
| [Request] ServerClient.Origin | archit | 4 | 4,894 |
09-19-2012, 01:35 Last Post: DidUknowiPwn |
|
| Help How to know weapon's base ServerClient.Ammo.PrimaryAmmoClip | narkos | 3 | 3,772 |
07-18-2012, 16:42 Last Post: narkos |
|
| Users browsing this thread: |
| 3 Guest(s) |