San Andreas / Mod / Mod CLEO

Simple HUD



Valutazioni:

Per favore, prima accedi.


Preferiti:

Scarica
13.77Kb
Tasso di rilevamento virus: 0%
Vedi rapporto scansione antivirus

Video


Devi aver effettuato l'accesso per aggiungere video a questa mod.

Descrizione

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.

Sono già stati pubblicati 9 commenti.

GVModDistintivo modder
Kingpin
204
Profilo
05/28/2020 01:17



Cita | Rispondi | (0)
Ztalker867Distintivo modder
Kingpin
106
Profilo
05/16/2020 05:53

nice hud men!

Cita | Rispondi | (0)
MiRuLL
Crew Enforcer
50
Profilo
05/13/2020 12:09



Cita | Rispondi | (0)
papai102Distintivo modder
Criminal Mastermind
627
Profilo
05/12/2020 03:58



Cita | Rispondi | (0)
05/12/2020 00:08

Good Man.

Cita | Rispondi | (3)
FiR2020Distintivo modder
Los Santos Veteran
506
Profilo
05/11/2020 20:06



Cita | Rispondi | (0)
VitalDistintivo modder
Kingpin
7
Profilo
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.

Cita | Rispondi | (1)
KingSam
Wheelman
17
Profilo
05/11/2020 18:18

WOW

Cita | Rispondi | (0)
DavidstrsDistintivo modder
Los Santos Veteran
908
Profilo
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

Cita | Rispondi | (2)