Jump to content

Recommended Posts

Posted (edited)

This occurs due to player stamina hitting zero, resulting in hp being lost. Below is the workaround for this in both C# and JavaScript.

C#

//Subscribe the Tick event
Events.Tick += Tick;

public void Tick(List<Events.TickNametagData> nametags)
{
    RAGE.Game.Player.RestorePlayerStamina(1.0F);
}

JavaScript

mp.events.add('render', () => {
    mp.game.player.restoreStamina(100);
});

Β 

Edited by Jaimuzu
added event subscription
  • Like 3
  • Mask 1
  • Sad 1
Posted
1 minute ago, amahone said:

Usefull, thx
I added statement


if(mp.players.local.isSprinting())
{
	mp.game.player.restoreStamina(100);
}

Β 

epic. glad you like men))))πŸ’™πŸ’™πŸ’™πŸ’™πŸ’™

  • Like 3
Posted
8 hours ago, trolovecro said:

Didnt even know about that lol. Thanks!

πŸ˜€πŸ˜€πŸ˜€πŸ˜€πŸ˜€πŸ˜€πŸ˜€πŸ˜€πŸ˜€πŸ˜€πŸ˜€Β youre welcome on ragemp

  • Like 2
  • 3 months later...
  • 3 weeks later...
Posted
vor 18 Stunden schrieb Outernet Roleplay:

You'll need to place it in a clientside file.

ya had that twice already and did not worked but found myself why and solved it, thanks for the respone o/

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...