San Andreas / Mods / Mods CLEO

Simple HUD



Calificaciones:

Por favor, inicia sesión primero.


Favoritos:

Descargar
13.77Kb
Tasa de detección de virus: 0%
Ver informe del escaneo de virus

Videos


Necesitas haber iniciado sesión para añadir vídeos a este mod.

Descripción

Simple HUD for GTA San Andreas

Author: Vital

Yet another CLEO script made mainly to teach coding. This time I've made a HUD of my own that, though simple, displays all the necessary game info and has a few nice features:
• can be turned off in menu (no need to remember or bind a key for that)
• some elements' colour changes depending on its value (e.g. the clock becomes darker as the night draws closer, the ammo gets brighter when you become low on ammo)
• slightly moves when you move mouse or analogue stick.

Apart from this, while reading the code, you can learn to:
• use constants
• work with memory addresses
• utilise text_draw mode
• draw texts close to one another without overlapping
• read mouse's or analogue stick's offset
• know how many ammo is left in the magazine
• make one values dependent on others (and even use sine for that!)
• read from the game's memory how much oxygen is left
• read from the game's memory how much the police are angry
• use scm-functions

17.05.2020: fixed ammo showing for some weapon categories + slightly increased stability.

Ya se han publicado 9 comentarios.

05/28/2020 01:17



Citar | Responder
05/16/2020 05:53

nice hud men!

Citar | Responder
05/13/2020 12:09



Citar | Responder
05/12/2020 03:58



Citar | Responder
05/12/2020 00:08

Good Man.

Citar | Responder
05/11/2020 20:06



Citar | Responder
05/11/2020 18:27

@Davidstrs, yes, of course. Just as the description reads, the script is intended to help people learn scripting, not only to provide them with a new HUD.

And yes, 0A4A is the main opcode that allows the text to move. I have some predefined coordinates where each text should be, and then, in a separate scm-function, I utilise that opcode to determine the offset from default positions. The offset is limited to a certain degree so that the text doesn't go off screen. That's it! The principle is simple, yet it took me some time to figure out the actual implementation in the code.

Citar | Responder
05/11/2020 18:18

WOW

Citar | Responder
05/11/2020 18:17

hey Vital don't mind that i look in source code just to see why is text moving when you move mouse i see here you using it 0A4A: store_joystick_X_offset and why is that ? if you want perfect screen resolution and right screen position i can give script that works with any resolution

Citar | Responder