02-11-2013, 21:15
here's an example of how you can add a random spawn
CSHARP Code
- string map = "";
- public override void OnMapChange()
- {
- map = GetDvar("mapname");
- }
- public override void OnPlayerSpawned(ServerClient Client)
- {
- int spawn;
- spawn = rnd.Next(0, 3);
-
- if (map == "mp_dome") // the map you want
- {
- if (spawn == 1)
- {
- Client.OriginX = 100f; //Change the location to whatever you want
- Client.OriginY = 100f;
- Client.OriginZ = 100f;
- }
- if (spawn == 2)
- {
- Client.OriginX = 200f; //Change the location to whatever you want
- Client.OriginY = 200f;
- Client.OriginZ = 200f;
- }
- //etc.
- }
- }