Jump to content

Increasing Player Statistics in SA (CLEO)


Recommended Posts

Well, I am working on a GTA SA cleo mod.

It is a shower mod, I have managed to make the player recuperate health, but I wanted to increase the sex appeal and the stamina of the player, here is the part of the script that increases player stats:

 

0@ = Actor.Health($PLAYER_ACTOR)

0@ += 100

Actor.Health($PLAYER_ACTOR) = 0@

0A10: increase_integer_stat 25 by 999999

0A10: increase_integer_stat 24 by 40

wait 5000

jump @SHOWER_28

 

can someone PLEASE TELL ME what is wrong? It only increases health but sex appeal (integer stat 25) and stamina (integer stat 24) stay the same!

 

PLEASE HELP turn.gif

Thanks in advance!

 

rodrich266

Link to comment
https://gtaforums.com/topic/468689-increasing-player-statistics-in-sa-cleo/
Share on other sites

I'm not sure because I've never used opcode 0A10 but my guess is that you would need to use the correct opcode to "increase float stat" and then include a decimal value in the "by" field. I usually use 062A and 629 to set absolute values for float and integer stats; examples are included below.

 

 

062A: change_float_stat 22 to 1000.0   // stamina062A: change_float_stat 25 to 1000.0 // sex appeal  062A: change_float_stat 24 to 1000.0       // max health0001: wait 0 ms   // needed between stat change & health change 0223: set_actor $PLAYER_ACTOR health_to 1760629: change_integer_stat 225 to 1000  // lung capacity 

 

Ah, nice coincidence. I've been expanding on opcode information for the v2 edition of the Opcode Database.

 

The stat opcodes don't actually seem to even care when it comes to the data type. If you use a float stat opcode with any stat ID higher than 81 (82 or higher), the game will write float information anyway.

 

This is the same with opcodes like 0004 and 0006. There is no difference between them. Different flags are passed to a function but that flag is ignored and instead, the data type used (crossfading from different GTA engines, I believe).

 

 

The reason for the different in the opcodes, I'd say, is how Rockstars compiler treated the native functions.

 

 

Again, I come and force a load of irrelevant information... hope you can make use of it anyway.

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
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.