[Tutorial] Spawn Protection

Page 1 of 3 123 LastLast
Results 1 to 25 of 59
  1. #1
    Connoisseur of Fine Code SanGawku is offline
    ModeratorRank
    Oct 2006 Join Date
    CyberSpanksLocation
    643Posts

    cool [Tutorial] Spawn Protection

    So because I'm a nice guy and someone called me a dick, cause I asked for 20 EUR for this code.
    I will release my spawn protection anyways. So enjoy spawn protection!

    This version avoids people taking advantage of using a temporary god mode by
    restricting the usage of weapons while under spawn protection.
    People can tell you are in Spawn Protection by the aura around you.

    Also a note, to the jerkoff that said I was a bane on the internet.
    Go F*** yourself, when you start releasing stuff maybe then you can have an opinion
    about me. But I work as a developer, and I run a server to provide fun to people,
    not because I have to but because I want to, and nothing in life is free;Especially on
    the internet.

    Now after this small rant ENJOY!

    In the client

    AI_Player.cpp

    around Line number 3494 change from

    Code:
    if(CurLoadout.GameFlags & wiCharDataFull::GAMEFLAG_NearPostBox)
    to

    Code:
    if((CurLoadout.GameFlags & wiCharDataFull::GAMEFLAG_NearPostBox) || (CurLoadout.GameFlags & wiCharDataFull::GAMEFLAG_isSpawnProtected))
    After

    Code:
    if(m_AuraType == AT_MORHINE && r3dGetTime() > m_MorhineShotTime)
                m_AuraType = AT_NONE;
    Add this

    Code:
    if(CurLoadout.GameFlags && wiCharDataFull::GAMEFLAG_isSpawnProtected)
        m_AuraType = AT_SPAWNPROTECTION;
            if(!(CurLoadout.GameFlags && wiCharDataFull::GAMEFLAG_isSpawnProtected) &&  m_AuraType == AT_SPAWNPROTECTION)
        m_AuraType = AT_NONE;
    UserProfile.h

    after

    Code:
    GAMEFLAG_NearPostBox = (1 << 0),
    add this

    Code:
    GAMEFLAG_isSpawnProtected = (1 << 0 ),
    That's all in the client

    Now for the server

    //obj_ServerPlayer.cpp


    //in
    Code:
    void obj_ServerPlayer::UpdateWorldFlags()
    //after


    Code:
    loadout_->GameFlags = 0;
    //add


    //
    Code:
     //Spawn Protection Code here
            if((((r3dGetTime() - startPlayTime_) <= 20.0f)))
            loadout_->GameFlags |= wiCharDataFull::GAMEFLAG_isSpawnProtected;
    //ServerGameLogic.cpp


    //in
    Code:
    bool ServerGameLogic::ApplyDamageToPlayer(GameObject* fromObj, obj_ServerPlayer* targetPlr, const r3dPoint3D& dmgPos, float damage, int bodyBone, int bodyPart, bool force_damage, STORE_CATEGORIES damageSource, int airState )
    //change line number 749 line about postboxes to this


    Code:
    if(((targetPlr->loadout_->GameFlags & wiCharDataFull::GAMEFLAG_NearPostBox)||
            (targetPlr->loadout_->GameFlags & wiCharDataFull::GAMEFLAG_isSpawnProtected)) && !force_damage)
    Last edited by SanGawku; 17-07-13 at 04:37 AM. Reason: Fixed I think?


  2. #2
    Member LayZ Gamer is offline
    MemberRank
    Mar 2013 Join Date
    89Posts

    Re: [Tutorial] Spawn Protection

    If you had read the rules you would see whoever called you that was correct. They could have simply called you out like I did rather than calling names. You have no right asking for money here. It is against the rules of this forum.

    Good job doing the right thing, we all appreciate it. Cheers!
    Last edited by LayZ Gamer; 16-07-13 at 05:56 AM.

  3. #3
    Connoisseur of Fine Code SanGawku is offline
    ModeratorRank
    Oct 2006 Join Date
    CyberSpanksLocation
    643Posts

    Re: [Tutorial] Spawn Protection

    Now when are you going to release something?

  4. #4
    Android Developer doidloko is offline
    MemberRank
    Aug 2012 Join Date
    BrasilLocation
    253Posts

    Re: [Tutorial] Spawn Protection

    lol realy nice man all in this forum is waiting for this thx kalisto

  5. #5
    Member LayZ Gamer is offline
    MemberRank
    Mar 2013 Join Date
    89Posts

    Re: [Tutorial] Spawn Protection

    Quote Originally Posted by kalisto2002 View Post
    Now when are you going to release something?
    Lol, what? I tested the release for DNC then everyone turned on him. I owe this community nothing for screwing DNC over. I have a lot I could touch on and I try to help with setup problems and such.

  6. #6
    Connoisseur of Fine Code SanGawku is offline
    ModeratorRank
    Oct 2006 Join Date
    CyberSpanksLocation
    643Posts

    Re: [Tutorial] Spawn Protection

    Anyways I dont want this thread full of Bashing on each other. So truce and We leave it at that?

  7. #7
    Member LayZ Gamer is offline
    MemberRank
    Mar 2013 Join Date
    89Posts

    Re: [Tutorial] Spawn Protection

    Quote Originally Posted by kalisto2002 View Post
    Anyways I dont want this thread full of Bashing on each other. So truce and We leave it at that?
    For sure, I have been wanting to do a setup video, or a proper tutorial on adding everything from Infestation. However it seems anytime somebody has tried this they get a select few(wont mention names) Brazilian users bashing the thread saying it is stolen.

  8. #8
    Connoisseur of Fine Code SanGawku is offline
    ModeratorRank
    Oct 2006 Join Date
    CyberSpanksLocation
    643Posts

    Re: [Tutorial] Spawn Protection

    Well add me on skype, maybe we can make something happen about that
    Last edited by SanGawku; 23-05-15 at 01:10 PM.

  9. #9
    Member UltraTM is offline
    MemberRank
    Feb 2013 Join Date
    GERLocation
    83Posts

    Re: [Tutorial] Spawn Protection

    Would be nice to see a Tutorial about adding everything from Infestation :)

  10. #10
    Proficient Member vinnieshuda is offline
    MemberRank
    Jan 2013 Join Date
    158Posts

    Re: [Tutorial] Spawn Protection

    I think the auraeffect from AT_SPAWNPROTECTION is visible only for the player, who protected...

    Right?

  11. #11
    Member LayZ Gamer is offline
    MemberRank
    Mar 2013 Join Date
    89Posts

    Re: [Tutorial] Spawn Protection

    Quote Originally Posted by vinnieshuda View Post
    I think the auraeffect from AT_SPAWNPROTECTION is visible only for the player, who protected...

    Right?
    This method does not display an aurora effect on the player. This only shows the safe zone shield symbol in the bottom left.

    This method works great, basically this makes the game think you are in a safe zone for whatever time you set for the protection. This prevents the unfair advantage from Infestation where the protected person can shoot and get a kill before the protection is off.

    And yes I know shooting turns it off in Infestation, however most of the time the person has a sniper or shotty, so they only need the single shot.
    Last edited by LayZ Gamer; 16-07-13 at 01:13 PM.

  12. #12
    Custom Title Enabled GigaToni is offline
    MemberRank
    Aug 2009 Join Date
    GER / FRLocation
    2,329Posts

    Re: [Tutorial] Spawn Protection

    Wrong. AT_SPAWNPROTECT is a AURA EFFECT. It IS the effect on the original WarZ and War Inc.

  13. #13
    Nobody folkz is offline
    MemberRank
    Apr 2013 Join Date
    BrazilLocation
    526Posts

    Re: [Tutorial] Spawn Protection

    Quote Originally Posted by LayZ Gamer View Post
    For sure, I have been wanting to do a setup video, or a proper tutorial on adding everything from Infestation. However it seems anytime somebody has tried this they get a select few(wont mention names) Brazilian users bashing the thread saying it is stolen.
    Yuri? hehehehehehe
    I do not care to talk about names.... who does not speak his mind has afraid of others opinions xD

    @Topic: Nice Tutorial Kalisto I agree with others should not charge to teach something clear that it's no use getting all teaching and nobody help at all :)

  14. #14
    Android Developer doidloko is offline
    MemberRank
    Aug 2012 Join Date
    BrasilLocation
    253Posts

    Re: [Tutorial] Spawn Protection

    it work here but player dont die o.o
    aura work at 20 seconds but players cant kill players *-*

  15. #15
    Account Upgraded | Title Enabled! JonnyTruant is offline
    MemberRank
    Mar 2013 Join Date
    555Posts

    Re: [Tutorial] Spawn Protection

    Everyone turned out at DNC because he stole codes from GigaToni and iKasu.

  16. #16
    Connoisseur of Fine Code SanGawku is offline
    ModeratorRank
    Oct 2006 Join Date
    CyberSpanksLocation
    643Posts

    Re: [Tutorial] Spawn Protection

    I'm just in a desperate situation. I had a sponsor that randomly quit sponsoring me. No warning, no time to backup anything
    My forums... gone, my website... gone, I have to rebuild all from scratch and one of my members paid for a VPS but its
    been 3 days, and still hasn't been setup. I was going to try and gather the funding for another VPS with instant on :)

    Your right though, If I was going to sell the code, I should have at the very least put it in the right forum.
    But nobody from here would have seen it. So it would have been pointless pretty much.

  17. #17
    Member LayZ Gamer is offline
    MemberRank
    Mar 2013 Join Date
    89Posts

    Re: [Tutorial] Spawn Protection

    Quote Originally Posted by GigaToni View Post
    Wrong. AT_SPAWNPROTECT is a AURA EFFECT. It IS the effect on the original WarZ and War Inc.
    Lol I have tried this, no aura is displayed on the player. Only the safe zone icon is shown.

    Here is what should activate the effect, however it does not work, all I see is the icon in bottom left.

    Code:
    if(r3dGetTime() < m_MorhineShotTime && m_AuraType == AT_NONE)
    	m_AuraType = AT_MORHINE;
    if(m_AuraType == AT_MORHINE && r3dGetTime() > m_MorhineShotTime)
    	m_AuraType = AT_NONE;
    if(CurLoadout.GameFlags & wiCharDataFull::GAMEFLAG_isSpawnProtected)
    	m_AuraType = AT_SPAWNPROTECTION;
    if(!(CurLoadout.GameFlags & wiCharDataFull::GAMEFLAG_isSpawnProtected) &&  m_AuraType == AT_SPAWNPROTECTION)
    	m_AuraType = AT_NONE;
    Last edited by LayZ Gamer; 16-07-13 at 09:55 PM.

  18. #18
    Connoisseur of Fine Code SanGawku is offline
    ModeratorRank
    Oct 2006 Join Date
    CyberSpanksLocation
    643Posts

    [Tutorial] Spawn Protection

    Sorry try using the double & instead of the single &
    That should work

  19. #19
    Valued Member Stea1th is offline
    MemberRank
    Mar 2013 Join Date
    149Posts

    Re: [Tutorial] Spawn Protection

    I got the problem with nobody can be killed now aswell XD

  20. #20
    Connoisseur of Fine Code SanGawku is offline
    ModeratorRank
    Oct 2006 Join Date
    CyberSpanksLocation
    643Posts

    [Tutorial] Spawn Protection

    Give me a bit when I get back to my house ill get it fixed sorry about the shoddy code lol

  21. #21
    Yuri-BR#1559 Yuri-BR is offline
    DeveloperRank
    Apr 2013 Join Date
    ☣️❤️Location
    1,040Posts

    Re: [Tutorial] Spawn Protection

    Nice ;)

  22. #22
    Retired. Don't PM. SecretsOThePast is offline
    DeveloperRank
    Jan 2009 Join Date
    643Posts

    Re: [Tutorial] Spawn Protection

    Here's a hint: !

  23. #23
    Account Upgraded | Title Enabled! JonnyTruant is offline
    MemberRank
    Mar 2013 Join Date
    555Posts

    Re: [Tutorial] Spawn Protection

    Where's the hint SOTP?

  24. #24
    Holy mother jesus tractor Kratos147 is offline
    MemberRank
    Jan 2011 Join Date
    CroatiaLocation
    470Posts

    Re: [Tutorial] Spawn Protection

    Quote Originally Posted by JonnyTruant View Post
    Where's the hint SOTP?
    == != !=?

    coders should understand.

  25. #25
    Account Upgraded | Title Enabled! JonnyTruant is offline
    MemberRank
    Mar 2013 Join Date
    555Posts

    Re: [Tutorial] Spawn Protection

    Ah yes I got it, but where? It's a mystery.



Page 1 of 3 123 LastLast

Advertisement