How does the logic for the zombie survival maps work?

Discussion in 'Coding help' started by FlashFyre, Jan 21, 2019.

  1. FlashFyre

    FlashFyre New Member

    Joined:
    Jan 20, 2019
    Messages:
    9
    Likes Received:
    1
    Hey, so I'm attempting to learn SourcePawn and make my own zombie survival gamemode (relax, it won't put your servers out of business xD), and before I attempt coding the tougher stuff, like special rounds with special gamemodes, how does the base logic for the gamemode work? Because the plugins are obviously closed-source.

    To give you a better idea of what I am asking, here's what I have coded far:
    - Class changes are disabled if you are already in a class
    - Engineers become medics when they die

    So, can anyone give an insight about how I remove a maps default logic? I.e, when I add a zs_ map to the server, it seems to use arena logic and I can't do anything, and the desired objective is obviously so that BLU wins when there is no-one left on red, and the engineers win when a timer reaches zero.
     
  2. Naleksuh

    Naleksuh New Member

    Joined:
    Nov 4, 2017
    Messages:
    23
    Likes Received:
    3
    The easiest way for new coders is probably a .cfg file executed.

    Add this code to "zs.cfg" (in your server's /tf/cfg folder):

    sv_cheats 1;ent_remove_all team_round_timer;ent_remove_all trigger_capture_area;ent_remove_all minecart_tracktrain;ent_remove_all item_teamflag;ent_remove_all tf_logic_arena;ent_remove_all tf_logic_koth;sv_cheats 0


    Then, whereever your round starts, add this to your SourceMod plugin:

    ServerCommand("exec zs");

    Also, I wouldn't recommend using Jack5's maps without his permission. I can almost guarantee he won't take kindly to it.
     
  3. Naleksuh

    Naleksuh New Member

    Joined:
    Nov 4, 2017
    Messages:
    23
    Likes Received:
    3
    Also, I've also been making my own ZS server just like you. You can add me on Steam if you want to collaborate C:
     
  4. FlashFyre

    FlashFyre New Member

    Joined:
    Jan 20, 2019
    Messages:
    9
    Likes Received:
    1
    Thanks for the info! As for “Jack5s Maps”, all I’ve done is download some zs_ maps from gamebanana... they are free to download so I don’t think there is a problem with using them. That being said, I was planning on making new zs_ maps myself, so it isn’t a huge problem if this 100% isn’t allowed.
     
    Jack5 likes this.
  5. Naleksuh

    Naleksuh New Member

    Joined:
    Nov 4, 2017
    Messages:
    23
    Likes Received:
    3
    good point, maybe ill use 'em on my server
     
  6. FlashFyre

    FlashFyre New Member

    Joined:
    Jan 20, 2019
    Messages:
    9
    Likes Received:
    1
    Do you know what event fires at the start of every round?
     
  7. Rushy

    Rushy Administrator
    Staff Member

    Joined:
    Oct 1, 2016
    Messages:
    384
    Likes Received:
    93
  8. FlashFyre

    FlashFyre New Member

    Joined:
    Jan 20, 2019
    Messages:
    9
    Likes Received:
    1
    I previously had a look at that but some of them don't have a description and there seems to be some confusion about whether some of them are accurate or not. Thanks anyway though :)
     
  9. FlashFyre

    FlashFyre New Member

    Joined:
    Jan 20, 2019
    Messages:
    9
    Likes Received:
    1
    The next thing I need to do is actually make a custom "game mode" with win conditions and such.