Log in to reply

What is the Function For Setting Skills? (Can't Find it In Game.Player/.Character)

  • I can't seem to find how to set/modify player skills like Stamina, Driving or Shooting.

    I have looked through Game.Player & Game.Player.Character and I'm not sure where else to look.

    Thanks for all help.

  • We can mark this as Solved I think.

    To set the stats for X character change the number after SP.
    PlayerZero = Micheal = SP0
    PlayerOne = Franklin = SP1
    PlayerTwo = Trevor = SP2

    C# Class

    public static class Stats
        public enum PlayerStats
        public static void SetPlayerStat(int playerIndex, PlayerStats stat, int value)
            if (playerIndex < 0 || playerIndex >= 3) throw new Exception("Stats.SetStat playerIndex must be between 0 and 2.");
            if (value < 0) throw new Exception("Stats.SetStat value cannot be negative.");
            string enumName = Enum.GetName(typeof(PlayerStats), stat);
            Function.Call(Hash.STAT_SET_INT, Game.GenerateHash(String.Format("SP{0}_{1}", playerIndex, enumName)), value, false);


    // Reset player zero
    Stats.SetPlayerStat(0, Stats.PlayerStats.TOTAL_CASH, 0);
    Stats.SetPlayerStat(0, Stats.PlayerStats.FLYING_ABILITY, 0);
    Stats.SetPlayerStat(0, Stats.PlayerStats.LUNG_CAPACITY, 0);
    Stats.SetPlayerStat(0, Stats.PlayerStats.SHOOTING_ABILITY, 0);
    Stats.SetPlayerStat(0, Stats.PlayerStats.STAMINA, 0);
    Stats.SetPlayerStat(0, Stats.PlayerStats.STEALTH_ABILITY, 0);
    Stats.SetPlayerStat(0, Stats.PlayerStats.STRENGTH, 0);
    Stats.SetPlayerStat(0, Stats.PlayerStats.WHEELIE_ABILITY, 0);
    // Reset player one
    Stats.SetPlayerStat(1, Stats.PlayerStats.TOTAL_CASH, 0);
    Stats.SetPlayerStat(1, Stats.PlayerStats.FLYING_ABILITY, 0);
    Stats.SetPlayerStat(1, Stats.PlayerStats.LUNG_CAPACITY, 0);
    Stats.SetPlayerStat(1, Stats.PlayerStats.SHOOTING_ABILITY, 0);
    Stats.SetPlayerStat(1, Stats.PlayerStats.STAMINA, 0);
    Stats.SetPlayerStat(1, Stats.PlayerStats.STEALTH_ABILITY, 0);
    Stats.SetPlayerStat(1, Stats.PlayerStats.STRENGTH, 0);
    Stats.SetPlayerStat(1, Stats.PlayerStats.WHEELIE_ABILITY, 0);
    // Reset player two
    Stats.SetPlayerStat(2, Stats.PlayerStats.TOTAL_CASH, 0);
    Stats.SetPlayerStat(2, Stats.PlayerStats.FLYING_ABILITY, 0);
    Stats.SetPlayerStat(2, Stats.PlayerStats.LUNG_CAPACITY, 0);
    Stats.SetPlayerStat(2, Stats.PlayerStats.SHOOTING_ABILITY, 0);
    Stats.SetPlayerStat(2, Stats.PlayerStats.STAMINA, 0);
    Stats.SetPlayerStat(2, Stats.PlayerStats.STEALTH_ABILITY, 0);
    Stats.SetPlayerStat(2, Stats.PlayerStats.STRENGTH, 0);
    Stats.SetPlayerStat(2, Stats.PlayerStats.WHEELIE_ABILITY, 0);

    You can see all stats in common.rpf/data/spstatssetup.xml and mpstatssetup.xml.


Log in to reply

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