Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OnRoundStart()
- {
- Game.PrintMessage("<size=17>Fall_Damage_Custom_Logic</size>");
- Game.PrintMessage("<size=12>Ensure_player_count_does_not_exceed_10</size>");
- VariableFloat.Set("speedThreshold", 23.0);
- VariableFloat.Set("xThreshold", 25.0);
- VariableFloat.Set("yThreshold", 75.0);
- VariableFloat.Set("zThreshold", 25.0);
- VariableFloat.Set("nxThreshold", -25.0);
- VariableFloat.Set("nyThreshold", -25.0);
- VariableFloat.Set("nzThreshold", -25.0);
- VariableFloat.Set("clearance", 0.5);
- VariableFloat.Set("nclearance", -0.5);
- VariableFloat.Set("oldSpeed0", 0.0);
- VariableFloat.Set("oldSpeed1", 0.0);
- VariableFloat.Set("oldSpeed2", 0.0);
- VariableFloat.Set("oldSpeed3", 0.0);
- VariableFloat.Set("oldSpeed4", 0.0);
- VariableFloat.Set("oldSpeed5", 0.0);
- VariableFloat.Set("oldSpeed6", 0.0);
- VariableFloat.Set("oldSpeed7", 0.0);
- VariableFloat.Set("oldSpeed8", 0.0);
- VariableFloat.Set("oldSpeed9", 0.0);
- VariableFloat.Set("eoldSpeed0", 0.0);
- VariableFloat.Set("eoldSpeed1", 0.0);
- VariableFloat.Set("eoldSpeed2", 0.0);
- VariableFloat.Set("eoldSpeed3", 0.0);
- VariableFloat.Set("eoldSpeed4", 0.0);
- VariableFloat.Set("eoldSpeed5", 0.0);
- VariableFloat.Set("eoldSpeed6", 0.0);
- VariableFloat.Set("eoldSpeed7", 0.0);
- VariableFloat.Set("eoldSpeed8", 0.0);
- VariableFloat.Set("eoldSpeed9", 0.0);
- VariableFloat.Set("x0", 0.0);
- VariableFloat.Set("x1", 0.0);
- VariableFloat.Set("x2", 0.0);
- VariableFloat.Set("x3", 0.0);
- VariableFloat.Set("x4", 0.0);
- VariableFloat.Set("x5", 0.0);
- VariableFloat.Set("x6", 0.0);
- VariableFloat.Set("x7", 0.0);
- VariableFloat.Set("x8", 0.0);
- VariableFloat.Set("x9", 0.0);
- VariableFloat.Set("y0", 0.0);
- VariableFloat.Set("y1", 0.0);
- VariableFloat.Set("y2", 0.0);
- VariableFloat.Set("y3", 0.0);
- VariableFloat.Set("y4", 0.0);
- VariableFloat.Set("y5", 0.0);
- VariableFloat.Set("y6", 0.0);
- VariableFloat.Set("y7", 0.0);
- VariableFloat.Set("y8", 0.0);
- VariableFloat.Set("y9", 0.0);
- VariableFloat.Set("z0", 0.0);
- VariableFloat.Set("z1", 0.0);
- VariableFloat.Set("z2", 0.0);
- VariableFloat.Set("z3", 0.0);
- VariableFloat.Set("z4", 0.0);
- VariableFloat.Set("z5", 0.0);
- VariableFloat.Set("z6", 0.0);
- VariableFloat.Set("z7", 0.0);
- VariableFloat.Set("z8", 0.0);
- VariableFloat.Set("z9", 0.0);
- VariableFloat.Set("vx0", 0.0);
- VariableFloat.Set("vx1", 0.0);
- VariableFloat.Set("vx2", 0.0);
- VariableFloat.Set("vx3", 0.0);
- VariableFloat.Set("vx4", 0.0);
- VariableFloat.Set("vx5", 0.0);
- VariableFloat.Set("vx6", 0.0);
- VariableFloat.Set("vx7", 0.0);
- VariableFloat.Set("vx8", 0.0);
- VariableFloat.Set("vx9", 0.0);
- VariableFloat.Set("vy0", 0.0);
- VariableFloat.Set("vy1", 0.0);
- VariableFloat.Set("vy2", 0.0);
- VariableFloat.Set("vy3", 0.0);
- VariableFloat.Set("vy4", 0.0);
- VariableFloat.Set("vy5", 0.0);
- VariableFloat.Set("vy6", 0.0);
- VariableFloat.Set("vy7", 0.0);
- VariableFloat.Set("vy8", 0.0);
- VariableFloat.Set("vy9", 0.0);
- VariableFloat.Set("vz0", 0.0);
- VariableFloat.Set("vz1", 0.0);
- VariableFloat.Set("vz2", 0.0);
- VariableFloat.Set("vz3", 0.0);
- VariableFloat.Set("vz4", 0.0);
- VariableFloat.Set("vz5", 0.0);
- VariableFloat.Set("vz6", 0.0);
- VariableFloat.Set("vz7", 0.0);
- VariableFloat.Set("vz8", 0.0);
- VariableFloat.Set("vz9", 0.0);
- VariableFloat.Set("evx0", 0.0);
- VariableFloat.Set("evx1", 0.0);
- VariableFloat.Set("evx2", 0.0);
- VariableFloat.Set("evx3", 0.0);
- VariableFloat.Set("evx4", 0.0);
- VariableFloat.Set("evx5", 0.0);
- VariableFloat.Set("evx6", 0.0);
- VariableFloat.Set("evx7", 0.0);
- VariableFloat.Set("evx8", 0.0);
- VariableFloat.Set("evx9", 0.0);
- VariableFloat.Set("evy0", 0.0);
- VariableFloat.Set("evy1", 0.0);
- VariableFloat.Set("evy2", 0.0);
- VariableFloat.Set("evy3", 0.0);
- VariableFloat.Set("evy4", 0.0);
- VariableFloat.Set("evy5", 0.0);
- VariableFloat.Set("evy6", 0.0);
- VariableFloat.Set("evy7", 0.0);
- VariableFloat.Set("evy8", 0.0);
- VariableFloat.Set("evy9", 0.0);
- VariableFloat.Set("evz0", 0.0);
- VariableFloat.Set("evz1", 0.0);
- VariableFloat.Set("evz2", 0.0);
- VariableFloat.Set("evz3", 0.0);
- VariableFloat.Set("evz4", 0.0);
- VariableFloat.Set("evz5", 0.0);
- VariableFloat.Set("evz6", 0.0);
- VariableFloat.Set("evz7", 0.0);
- VariableFloat.Set("evz8", 0.0);
- VariableFloat.Set("evz9", 0.0);
- }
- OnUpdate()
- {
- VariableInt.Set("counter", 0);
- VariablePlayer.Set("player", VariablePlayer("null"));
- ForeachPlayer("player")
- {
- VariableString.Concat("xDir","x",VariableInt("counter").ConvertToString());
- VariableString.Concat("yDir","y",VariableInt("counter").ConvertToString());
- VariableString.Concat("zDir","z",VariableInt("counter").ConvertToString());
- VariableString.Concat("vxDir","vx",VariableInt("counter").ConvertToString());
- VariableString.Concat("vyDir","vy",VariableInt("counter").ConvertToString());
- VariableString.Concat("vzDir","vz",VariableInt("counter").ConvertToString());
- VariableString.Concat("evxDir","evx",VariableInt("counter").ConvertToString());
- VariableString.Concat("evyDir","evy",VariableInt("counter").ConvertToString());
- VariableString.Concat("evzDir","evz",VariableInt("counter").ConvertToString());
- VariableFloat.Set("x", VariablePlayer("player").GetPositionX());
- VariableFloat.Set("y", VariablePlayer("player").GetPositionY());
- VariableFloat.Set("z", VariablePlayer("player").GetPositionZ());
- VariableFloat.Subtract("x", VariableFloat(VariableString("xDir")));
- VariableFloat.Subtract("y", VariableFloat(VariableString("yDir")));
- VariableFloat.Subtract("z", VariableFloat(VariableString("zDir")));
- VariableFloat.Set("vx", VariableFloat("x"));
- VariableFloat.Set("vy", VariableFloat("y"));
- VariableFloat.Set("vz", VariableFloat("z"));
- VariableFloat.Set("x", VariablePlayer("player").GetPositionX());
- VariableFloat.Set("y", VariablePlayer("player").GetPositionY());
- VariableFloat.Set("z", VariablePlayer("player").GetPositionZ());
- VariableString.Concat("oldSpeedDir","oldSpeed",VariableInt("counter").ConvertToString());
- VariableString.Concat("eoldSpeedDir","eoldSpeed",VariableInt("counter").ConvertToString());
- VariableFloat.Set("speedCompareTemp", VariablePlayer("player").GetSpeed());
- VariableFloat.Add("speedCompareTemp", VariableFloat("speedThreshold"))
- If(Float.GreaterThan(VariableFloat(VariableString("oldSpeedDir")), VariableFloat("speedCompareTemp")))
- {
- If(Float.GreaterThan(VariableFloat(VariableString("vxDir")), VariableFloat("xThreshold")))
- {
- If(Float.GreaterThan(VariableFloat(VariableString("evxDir")), 0.0))
- {
- If(Float.LessThan(VariableFloat("vx"), VariableFloat("clearance")))
- {
- Player.KillPlayer(VariablePlayer("player"),"Ouch")
- }
- }
- If(Float.LessThan(VariableFloat(VariableString("evxDir")), 0.0))
- {
- If(Float.GreaterThan(VariableFloat("vx"), VariableFloat("nclearance")))
- {
- Player.KillPlayer(VariablePlayer("player"),"Ouch")
- }
- }
- }
- If(Float.LessThan(VariableFloat(VariableString("vxDir")), VariableFloat("nxThreshold")))
- {
- If(Float.GreaterThan(VariableFloat(VariableString("evxDir")), 0.0))
- {
- If(Float.LessThan(VariableFloat("vx"), VariableFloat("clearance")))
- {
- Player.KillPlayer(VariablePlayer("player"),"Ouch")
- }
- }
- If(Float.LessThan(VariableFloat(VariableString("evxDir")), 0.0))
- {
- If(Float.GreaterThan(VariableFloat("vx"), VariableFloat("nclearance")))
- {
- Player.KillPlayer(VariablePlayer("player"),"Ouch")
- }
- }
- }
- If(Float.GreaterThan(VariableFloat(VariableString("vzDir")), VariableFloat("zThreshold")))
- {
- If(Float.GreaterThan(VariableFloat(VariableString("evzDir")), 0.0))
- {
- If(Float.LessThan(VariableFloat("vz"), VariableFloat("clearance")))
- {
- Player.KillPlayer(VariablePlayer("player"),"Ouch")
- }
- }
- If(Float.LessThan(VariableFloat(VariableString("evzDir")), 0.0))
- {
- If(Float.GreaterThan(VariableFloat("vz"), VariableFloat("nclearance")))
- {
- Player.KillPlayer(VariablePlayer("player"),"Ouch")
- }
- }
- }
- If(Float.LessThan(VariableFloat(VariableString("vzDir")), VariableFloat("nzThreshold")))
- {
- If(Float.GreaterThan(VariableFloat(VariableString("evzDir")), 0.0))
- {
- If(Float.LessThan(VariableFloat("vz"), VariableFloat("clearance")))
- {
- Player.KillPlayer(VariablePlayer("player"),"Ouch")
- }
- }
- If(Float.LessThan(VariableFloat(VariableString("evzDir")), 0.0))
- {
- If(Float.GreaterThan(VariableFloat("vz"), VariableFloat("nclearance")))
- {
- Player.KillPlayer(VariablePlayer("player"),"Ouch")
- }
- }
- }
- If(Float.GreaterThan(VariableFloat(VariableString("vyDir")), VariableFloat("yThreshold")))
- {
- If(Float.GreaterThan(VariableFloat(VariableString("evyDir")), 0.0))
- {
- If(Float.LessThan(VariableFloat("vy"), VariableFloat("clearance")))
- {
- Player.KillPlayer(VariablePlayer("player"),"Ouch")
- }
- }
- If(Float.LessThan(VariableFloat(VariableString("evyDir")), 0.0))
- {
- If(Float.GreaterThan(VariableFloat("vy"), VariableFloat("nclearance")))
- {
- Player.KillPlayer(VariablePlayer("player"),"Ouch")
- }
- }
- }
- If(Float.LessThan(VariableFloat(VariableString("vyDir")), VariableFloat("nyThreshold")))
- {
- If(Float.GreaterThan(VariableFloat(VariableString("evyDir")), 0.0))
- {
- If(Float.LessThan(VariableFloat("vy"), VariableFloat("clearance")))
- {
- Player.KillPlayer(VariablePlayer("player"),"Ouch")
- }
- }
- If(Float.LessThan(VariableFloat(VariableString("evyDir")), 0.0))
- {
- If(Float.GreaterThan(VariableFloat("vy"), VariableFloat("nclearance")))
- {
- Player.KillPlayer(VariablePlayer("player"),"Ouch")
- }
- }
- }
- }
- VariableFloat.Set(VariableString("xDir"), VariableFloat("x"));
- VariableFloat.Set(VariableString("yDir"), VariableFloat("y"));
- VariableFloat.Set(VariableString("zDir"), VariableFloat("z"));
- VariableFloat.Set(VariableString("evxDir"), VariableFloat(VariableString("vxDir")));
- VariableFloat.Set(VariableString("evyDir"), VariableFloat(VariableString("vyDir")));
- VariableFloat.Set(VariableString("evzDir"), VariableFloat(VariableString("vzDir")));
- VariableFloat.Set(VariableString("vxDir"), VariableFloat("vx"));
- VariableFloat.Set(VariableString("vyDir"), VariableFloat("vy"));
- VariableFloat.Set(VariableString("vzDir"), VariableFloat("vz"));
- VariableFloat.Set("playerSpeed", VariablePlayer("player").GetSpeed());
- VariableFloat.Set(VariableString("eoldSpeedDir"), VariableFloat(VariableString("oldSpeedDir")));
- VariableFloat.Set(VariableString("oldSpeedDir"), VariableFloat("playerSpeed"));
- VariableInt.Add("counter", 1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment