Results 1 to 10 of 10
  1. #1
    Spectre11's Avatar
    Join Date
    May 2016
    Gender
    male
    Posts
    40
    Reputation
    10
    Thanks
    203
    My Mood
    Blah

    [FSOD] Stop Spawning Of Certain Things!

    Step 1:
    Go to WServer/Realm/Commands/AdminCommands.cs and find your spawn command

    Step 2:
    Find

    Code:
                    {
                        player.SendInfo("Unknown entity!");
                        return false;
                    }
    And place
    Code:
                    if (name.ToLower().Contains("enemy here"))
                    {
                        player.SendError("Cannot spawn this object!");
                        return false;
                    }
    If you want to have it so only a certain rank can do it do this instead
    Code:
                    if ((name.ToLower().Contains("*Enemy Here*")) && Client.Account.Rank == *Rank Here*)
                    {
                        player.SendError("Cannot spawn this object!");
                        return false;
    Step 3:
    Rebuild Solution

  2. The Following 2 Users Say Thank You to Spectre11 For This Useful Post:

    coolguy950 (10-24-2016),EHaehthsthethetheh (10-23-2016)

  3. #2
    AzzyG's Avatar
    Join Date
    Aug 2016
    Gender
    male
    Location
    I Think The Worst Thing You Can Do About a Situation Is Nothing
    Posts
    1,732
    Reputation
    261
    Thanks
    476
    Quote Originally Posted by Spectre11 View Post
    Step 1:
    Go to WServer/Realm/Commands/AdminCommands.cs and find your spawn command

    Step 2:
    Find

    Code:
                    {
                        player.SendInfo("Unknown entity!");
                        return false;
                    }
    And place
    Code:
                    if (name.ToLower().Contains("enemy here"))
                    {
                        player.SendError("Cannot spawn this object!");
                        return false;
                    }
    If you want to have it so only a certain rank can do it do this instead
    Code:
                    if ((name.ToLower().Contains("*Enemy Here*")) && Client.Account.Rank == *Rank Here*)
                    {
                        player.SendError("Cannot spawn this object!");
                        return false;
    Step 3:
    Rebuild Solution
    This is very useful so donors don't run around killing people with O2s

  4. #3
    Riigged's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Location
    no
    Posts
    3,846
    Reputation
    401
    Thanks
    10,254
    My Mood
    Devilish
    instead of this.. (highlighted in red)
    Code:
                    if ((name.ToLower().Contains("*Enemy Here*")) && Client.Account.Rank == *Rank Here*)
                    {
                        player.SendError("Cannot spawn this object!");
                        return false;
                     }
    it should be
    Code:
                    if ((name.ToLower().Contains("*Enemy Here*")) && Client.Account.Rank <= *Rank Here*)
    The way you made it basically does this:
    Lets say you fill in *Enemy Here* with Medusa, and *Rank Here* with 5..
    That means ONLY rank 5 can't spawn Medusa, but 1, 2, 3, 4 can still spawn it, so if you use <= 5, it will apply to rank 5 and everything below rank 5.

     








  5. The Following User Says Thank You to Riigged For This Useful Post:

    [MPGH]Ahl (10-24-2016)

  6. #4
    Spectre11's Avatar
    Join Date
    May 2016
    Gender
    male
    Posts
    40
    Reputation
    10
    Thanks
    203
    My Mood
    Blah
    Quote Originally Posted by Riigged View Post
    instead of this.. (highlighted in red)
    Code:
                    if ((name.ToLower().Contains("*Enemy Here*")) && Client.Account.Rank == *Rank Here*)
                    {
                        player.SendError("Cannot spawn this object!");
                        return false;
                     }
    it should be
    Code:
                    if ((name.ToLower().Contains("*Enemy Here*")) && Client.Account.Rank <= *Rank Here*)
    The way you made it basically does this:
    Lets say you fill in *Enemy Here* with Medusa, and *Rank Here* with 5..
    That means ONLY rank 5 can't spawn Medusa, but 1, 2, 3, 4 can still spawn it, so if you use <= 5, it will apply to rank 5 and everything below rank 5.
    I just used that because I wanted to make just 1 rank not be able to spawn it not all under it

  7. #5
    Riigged's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Location
    no
    Posts
    3,846
    Reputation
    401
    Thanks
    10,254
    My Mood
    Devilish
    Quote Originally Posted by Spectre11 View Post
    I just used that because I wanted to make just 1 rank not be able to spawn it not all under it
    well if rank 1 is the only rank that donators can get on your server, that could be the case, but most people usually add a few donator ranks (vip, super donator, etc)

     








  8. #6
    Ahl's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    /modcp
    Posts
    16,599
    Reputation
    3219
    Thanks
    5,383
    My Mood
    Angelic
    Quote Originally Posted by Spectre11 View Post
    I just used that because I wanted to make just 1 rank not be able to spawn it not all under it
    This is a tutorial right?

    I think you should add two methods of the spawning prevention. The one you currently have + Riigged's since every server owner would want it to be different
    News Force Head Editor from 09/14/2018 - 03/02/2020
    Publicist from 11/23/2017 - 06/07/2019
    Global Moderator since 09/24/2017
    Minion+ from 04/16/2017 - 09/24/2017
    Market Place Minion from 04/16/2017 - 09/24/2017
    Minecraft Minion from 02/23/2017 - 09/24/2017
    Realm of the Mad God Minion from 11/06/2016 - 09/24/2017

    Middleman from 09/14/2016 - 09/24/2017
    News Force Editor from 08/23/2016 - 09/14/2018
    News Force (Section of the Week) from 03/21/2016 - 07/17/2017
    News Force (User News) from 10/18/2015 - 09/14/2018

    Donator since 03/16/2015
    Realm of the Mad God Editor from 05/20/2014 - 07/08/2014
    Member since 12/23/2012


    Rep Power: 82

  9. #7
    Demon's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Location
    Lost
    Posts
    1,095
    Reputation
    86
    Thanks
    316
    My Mood
    Angelic
    Quote Originally Posted by Ahlwong View Post
    This is a tutorial right?

    I think you should add two methods of the spawning prevention. The one you currently have + Riigged's since every server owner would want it to be different
    Then Again, He Should Have Show A Method Were People Could Do Multiple Monsters (NOT TELLING HOW BTW) Cause Just Prevent Oryx Is Not That Helpful

    You Could Always Spawn Avater

  10. #8
    Spectre11's Avatar
    Join Date
    May 2016
    Gender
    male
    Posts
    40
    Reputation
    10
    Thanks
    203
    My Mood
    Blah
    Quote Originally Posted by DemonLives View Post
    Then Again, He Should Have Show A Method Were People Could Do Multiple Monsters (NOT TELLING HOW BTW) Cause Just Prevent Oryx Is Not That Helpful

    You Could Always Spawn Avater
    just do it multiple times
    Example:
    Code:
                    {
                        player.SendInfo("Unknown entity!");
                        return false;
                    }
                    if ((name.ToLower().Contains("*Enemy 1 Here*")) && Client.Account.Rank == *Rank Here*)
                    {
                        player.SendError("Cannot spawn this object!");
                        return false;
                    if ((name.ToLower().Contains("*Enemy 2 Here*")) && Client.Account.Rank == *Rank Here*)
                    {
                        player.SendError("Cannot spawn this object!");
                        return false;
                    if ((name.ToLower().Contains("*Enemy 3 Here*")) && Client.Account.Rank == *Rank Here*)
                    {
                        player.SendError("Cannot spawn this object!");
                        return false;
                    if ((name.ToLower().Contains("*Enemy 4 Here*")) && Client.Account.Rank == *Rank Here*)
                    {
                        player.SendError("Cannot spawn this object!");
                        return false;
    Or if you'd like it to be cleaner than this
    Code:
                    if ((name.ToLower().Contains("*Enemy Here*" || "*Enemy Here*" || "*Enemy Here*")) && Client.Account.Rank == *Rank Here*)
                    {
                        player.SendError("Cannot spawn this object!");
                        return false;
    Last edited by Spectre11; 10-24-2016 at 06:54 PM.

  11. #9
    lkdjnfoskjednfblksjdfn's Avatar
    Join Date
    Apr 2014
    Gender
    male
    Location
    127.0.0.1
    Posts
    1,340
    Reputation
    198
    Thanks
    841
    My Mood
    Inspired
    Nice work. For once somebody actually used a satisfying font color. You deserve a _bo_bo_!


    Here you go:


  12. The Following User Says Thank You to lkdjnfoskjednfblksjdfn For This Useful Post:

    Spectre11 (10-25-2016)

  13. #10
    Spectre11's Avatar
    Join Date
    May 2016
    Gender
    male
    Posts
    40
    Reputation
    10
    Thanks
    203
    My Mood
    Blah
    Quote Originally Posted by thenired View Post
    Nice work. For once somebody actually used a satisfying font color. You deserve a _bo_bo_!


    Here you go:

    Haha thanks

Similar Threads

  1. [WTB] Can someone spawn me some things in DayZ?
    By DayZB3ast in forum DayZ Selling / Trading / Buying
    Replies: 6
    Last Post: 04-04-2013, 03:52 AM
  2. [WTB] Can someone spawn me some things in DayZ?
    By DayZB3ast in forum DayZ Selling / Trading / Buying
    Replies: 1
    Last Post: 04-02-2013, 07:48 PM
  3. [Request] Want someone to spawn me some things for free:)
    By stexapc in forum DayZ Mod & Standalone Hacks & Cheats
    Replies: 0
    Last Post: 12-20-2012, 01:53 PM
  4. An idea to stop leechers among other things.
    By MercyKills in forum Combat Arms Discussions
    Replies: 49
    Last Post: 02-10-2010, 11:09 PM
  5. STOP WASTING YOUR TIME! (Things that are server-sided on MHS and UCE's)
    By xxBigBuns in forum Combat Arms Hacks & Cheats
    Replies: 16
    Last Post: 08-30-2008, 07:25 PM