yes <5 char >
[code=csharp]]using Addon;
using System;
using System.Collections;
using System.Threading;
using System.Collections.Generic;
namespace test
{
public class test : CPlugin
{
List<String> GotHealth=new List<String>();
public override void OnPlayerSpawned(ServerClient Client)
{
if(!GotHealth.Contains(Client.XUID) || Client.Team == Teams.Axis)
{
ProcessSpawn.Add(Client.ClientNum, 2/*seconds*/ * 1000 / AddonFrameInterval);
GotHealth.Add(Client.XUID);
}
}
Dictionary<int, int> ProcessSpawn = new Dictionary<int, int>();
public override void OnMapChange()
{
GotHealth.clear();
}
public override void OnFastRestart()
{
OnMapChange();
}
public override void OnAddonFrame()
{
List<int> PSKeys = new List<int>(ProcessSpawn.Keys);
foreach (int key in PSKeys)
{
ProcessSpawn[key]--;
if (ProcessSpawn[key] == 0)
{
ServerClient spawnedPlayer = GetClient(key);
foreach (ServerClient Client in GetClients())
{
if (Client.XUID == "0110000xxxxxxxx")
{
if (Client.Team == Teams.Allies)
{
Client.Other.Health += 560;
}
if (Client.Team == Teams.Axis)
{
Client.Other.Health += 260;
}
}
}
ProcessSpawn.Remove(key);
}
}
}
}
}[/code]
Use this if you want Axis to get Health more then one time.
[code=csharp]]using Addon;
using System;
using System.Collections;
using System.Threading;
using System.Collections.Generic;
namespace test
{
public class test : CPlugin
{
List<String> GotHealth=new List<String>();
public override void OnPlayerSpawned(ServerClient Client)
{
if(!GotHealth.Contains(Client.XUID) || Client.Team == Teams.Axis)
{
ProcessSpawn.Add(Client.ClientNum, 2/*seconds*/ * 1000 / AddonFrameInterval);
GotHealth.Add(Client.XUID);
}
}
Dictionary<int, int> ProcessSpawn = new Dictionary<int, int>();
public override void OnMapChange()
{
GotHealth.clear();
}
public override void OnFastRestart()
{
OnMapChange();
}
public override void OnAddonFrame()
{
List<int> PSKeys = new List<int>(ProcessSpawn.Keys);
foreach (int key in PSKeys)
{
ProcessSpawn[key]--;
if (ProcessSpawn[key] == 0)
{
ServerClient spawnedPlayer = GetClient(key);
foreach (ServerClient Client in GetClients())
{
if (Client.XUID == "0110000xxxxxxxx")
{
if (Client.Team == Teams.Allies)
{
Client.Other.Health += 560;
}
if (Client.Team == Teams.Axis)
{
Client.Other.Health += 260;
}
}
}
ProcessSpawn.Remove(key);
}
}
}
}
}[/code]
Use this if you want Axis to get Health more then one time.
![[Image: compiling.png]](http://imgs.xkcd.com/comics/compiling.png)


