Preview Auto tp to a location on kills
#1
Just trying to set it so on say 50 kills, player gets tp'd to a different location, any idea where i start? I already have the
if (Client.Stats.Kills == 25) etc working, just need the code to tp them on that amount of kills.

ty
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

Reply

#2
Is it even preview?
Use dictionaries or hash, when client gets 25 kills, just update it and teleport.
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#3
(12-30-2013, 12:20)hillbilly Wrote: Just trying to set it so on say 50 kills, player gets tp'd to a different location, any idea where i start? I already have the
if (Client.Stats.Kills == 25) etc working, just need the code to tp them on that amount of kills.

ty
you mean it?
Code:
using Addon; using System; using System.Collections.Generic; namespace ClassLibrary1 { public class ClassLibrary1 : CPlugin { public override void OnAddonFrame() { List<ServerClient> clients; try { clients = GetClients(); if (clients != null && clients.Count > 0) { foreach (ServerClient c in GetClients()) { if (c.Other.isAlive == true) { string map = GetDvar("mapname"); if (map == "mp_terminal_cls") { if (c.Stats.Kills == 50 && c.Team == Teams.Allies) { List<Vector> ListVector = new List<Vector>(); ListVector.Add(new Vector(50f, 70f, 200f)); // random position ListVector.Add(new Vector(50f, 70f, 200f)); // random position ListVector.Add(new Vector(50f, 70f, 200f)); // random position ListVector.Add(new Vector(50f, 70f, 200f)); // random position ListVector.Add(new Vector(50f, 70f, 200f)); // random position ListVector.Add(new Vector(50f, 70f, 200f)); // random position ListVector.Add(new Vector(50f, 70f, 200f)); // random position ListVector.Add(new Vector(50f, 70f, 200f)); // random position ListVector.Add(new Vector(50f, 70f, 200f)); // random position ListVector.Add(new Vector(50f, 70f, 200f)); // random position Random rand = new Random(); int flag = rand.Next(0, ListVector.Count); c.OriginX = ListVector[flag].X; c.OriginY = ListVector[flag].Y; c.OriginZ = ListVector[flag].Z; TellClient(c.ClientNum, string.Concat(new object[] { "^1Position Change with ^2rules" }), true); } } } } } } catch (Exception error) { iPrintLnBold("^1Error View Console Log", null); ServerPrint("Error\n"); ServerPrint(error.Message +"\n"+error.Source+"\n"+error.HelpLink); ServerPrint("\nError"); } } } }
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.