Log in to reply
 

[WIP] Script to permanently remove sweat(Need some Help)



  • Hi,
    so I managed to find the call function that I want to use in a simple script similar to SOB's No Player Wetness script

    PED::SET_PED_SWEAT
    Hashes: 0x27B0405F59637D1F 0x76A1DB9F

    void SET_PED_SWEAT(Ped ped, float sweat) // 0x27B0405F59637D1F 0x76A1DB9F

    Sweat is set to 100.0 or 0.0 in the decompiled scripts.

    What I want the script to do is have sweat always set to 0.0

    Would I be able to make it with GTA V Script Creator?

    Thanks in advance for your help :)



  • Try this

    using GTA;
    using System;
    
    namespace NoSweat
    {
    	public class NoSweat : Script
    	{
    		public NoSweat()
    		{
    			Interval = 100;
    			Tick += NoSweat_Tick;
    		}
    		
    		private void NoSweat_Tick(object sender, EventArgs e)
    		{
    			Ped plrPed = Game.Player.Character;
    			
    			if (plrPed != null && plrPed.Exists() && plrPed.IsAlive)
    			{
    				plrPed.Sweat = 0.0f;
    			}
    		}
    	}
    }
    

    Completely untested. Copy and paste into a file named NoSweat.cs in your scripts directory.

    Edit: updated code due to dumb mistake.



  • @Jitnaught said in [WIP] Script to permanently remove sweat(Need some Help):

    Try this

    using GTA;
    using System;
    
    namespace NoSweat
    {
    	public class NoSweat : Script
    	{
    		public NoSweat()
    		{
    			Interval = 100;
    			Tick += NoSweat_Tick;
    		}
    	}
    	
    	private void NoSweat_Tick(object sender, EventArgs e)
    	{
    		Ped plrPed = Game.Player.Character;
    		
    		if (plrPed != null && plrPed.Exists() && plrPed.IsAlive)
    		{
    			plrPed.Sweat = 0.0f;
    		}
    	}
    }
    

    Completely untested. Copy and paste into a file named NoSweat.cs in your scripts directory.

    it did nothing :(



  • What does the ScriptHookVDotNet.log file say?

    Edit:
    AmazyCrazy gave me the log in private message, which indicated I had a dumb mistake in my code.
    I updated the code and he reports that the mod works.


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.