Example #1
0
 public void GotoJobCommand(Client player, int jobId)
 {
     if (AdminChecks.CheckAdminLvl(player, 1))
     {
         player.position = Job.JobTable.Get(jobId).GetInstance().GetJobStartPoint();
     }
 }
 public void GmxCommand(Client player, int timeInMinutes, string info = "")
 {
     if (AdminChecks.CheckAdminLvl(player, 4))
     {
         InitShutdown(player.name, timeInMinutes, info);
     }
 }
        public void GotoCoordinatesCommand(Client player, string pos, int dim = 0)
        {
            if (AdminChecks.CheckAdminLvl(player, 3))
            {
                string[] positionParts = pos.Split(',');

                player.position  = new Vector3(float.Parse(positionParts[0]), float.Parse(positionParts[1]), float.Parse(positionParts[2]));
                player.dimension = dim;
            }
        }
Example #4
0
 public void PosCommand(Client player)
 {
     if (DevServer.CheckDevCommandAccess(player) || AdminChecks.CheckAdminLvl(player, 3))
     {
         Vector3 position = player.position;
         ChatHelper.SendChatNotificationToPlayer(player, "Position",
                                                 position.X.ToString(CultureInfo.CreateSpecificCulture("en-GB"))
                                                 + ", " + position.Y.ToString(CultureInfo.CreateSpecificCulture("en-GB"))
                                                 + ", " + position.Z.ToString(CultureInfo.CreateSpecificCulture("en-GB")));
     }
 }
Example #5
0
        public void VehCommand(Client player, string vehicleModelName)
        {
            if (DevServer.CheckDevCommandAccess(player) || AdminChecks.CheckAdminLvl(player, 3))
            {
                Vector3 position = player.position.Add(new Vector3(2, 2, 2));
                Vector3 rotation = player.rotation;

                VehicleHash myVehicle = API.vehicleNameToModel(vehicleModelName);
                Random      rnd       = new Random();
                API.createVehicle(myVehicle, position, rotation, rnd.Next(0, 159), rnd.Next(0, 159));
            }
        }