1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. GTA Network forum is now in archive mode.

How to Disable GTA V Death Event

Discussion in 'Tutorials/Documentations' started by Dylan, Dec 21, 2016.

  1. Dylan

    Dylan Member

    Messages:
    17
    Likes Received:
    9
    Joined:
    Oct 14, 2016
    Hello!

    Some others have been having trouble with the mini-map disappearing when they attempted to disable the default death system. Now I have been unable to disabled the 'Wasted' text but if you find a native that does so please reply with that native here.


    You should put this code under a OnDeath event. What this will do is when the player dies it'll bring them alive right at the same position they died at. You must use all of these natives to prevent the mini-map from disappearing and jacking up your client. From here you should be able to create your own death event using animations and such.
    Code:
         
                    API.sendNativeToPlayer(player, Hash._RESET_LOCALPLAYER_STATE, player);
                    API.sendNativeToPlayer(player, Hash.RESET_PLAYER_ARREST_STATE, player);
    
                    API.sendNativeToPlayer(player, Hash.IGNORE_NEXT_RESTART, true);
                    API.sendNativeToPlayer(player, Hash._DISABLE_AUTOMATIC_RESPAWN, true);
    
                    API.sendNativeToPlayer(player, Hash.SET_FADE_IN_AFTER_DEATH_ARREST, true);
                    API.sendNativeToPlayer(player, Hash.SET_FADE_OUT_AFTER_DEATH, false);
                    API.sendNativeToPlayer(player, Hash.NETWORK_REQUEST_CONTROL_OF_ENTITY, player);
    
                    API.sendNativeToPlayer(player, Hash.FREEZE_ENTITY_POSITION, player, false);
                    API.shared.sendNativeToPlayer(player, Hash.NETWORK_RESURRECT_LOCAL_PLAYER, player.position.X, player.position.Y, player.position.Z, player.rotation.Z, false, false);
                    API.shared.sendNativeToPlayer(player, Hash.RESURRECT_PED, player);
    
     
    taywon, Zgan and Blitzer like this.
  2. taywon

    taywon Active Member

    Messages:
    66
    Likes Received:
    17
    Joined:
    Aug 21, 2016
    Thank you very much. Can we make a small tuto on the wiki pls (or a link to this) ?
    I may be very useful (and we should have a server function in API to stop this event !)
     
  3. Pun1sh3r

    Pun1sh3r Member

    Messages:
    17
    Likes Received:
    4
    Joined:
    Dec 26, 2016
    Is there a way to remove the "Wasted" Text? It sucks
     
  4. root

    root Well-Known Member

    Messages:
    244
    Likes Received:
    88
    Joined:
    Aug 15, 2016
    I'm currently working on the Wasted text but still no result.
    But the CEF Browser overlays the wasted text. So if you create your own wasted text that is at least as big as the original text, it will overlay it and it won't be visible.
     
  5. Dylan

    Dylan Member

    Messages:
    17
    Likes Received:
    9
    Joined:
    Oct 14, 2016
    There is client side API.showshard ... but I've been unable to get rid of wasted text. I've created a work around though and left the wasted text to show when the player really dies.
     
  6. Pun1sh3r

    Pun1sh3r Member

    Messages:
    17
    Likes Received:
    4
    Joined:
    Dec 26, 2016
    Well I dont want to make my own Wasted Screen or Text, I want to hide it completly
     
  7. root

    root Well-Known Member

    Messages:
    244
    Likes Received:
    88
    Joined:
    Aug 15, 2016
    Probalby this would disable the "Wasted" screen but I can't test becouse the hash is not allowed @Adam
    Code:
    API.sendNativeToPlayer(player, 0x068E835A1D0DC0E3, "DeathFailOut");
     
  8. Dylan

    Dylan Member

    Messages:
    17
    Likes Received:
    9
    Joined:
    Oct 14, 2016
    It's not currentlying possible to do so.
     
  9. croky

    croky Active Member

    Messages:
    68
    Likes Received:
    3
    Joined:
    Jan 4, 2017
    So the wasted text will stay there until the player relogs?
     
  10. Adam

    Adam Staff Member Administrator Webmaster Developer

    Messages:
    275
    Likes Received:
    146
    Joined:
    Apr 3, 2016
    Use the API.showShard function to replace the text
     
    taywon, Meinhof and croky like this.

Share This Page