San Andreas / Mod / Mod CLEO

Simple HUD



Rating:

Login dulu, ya.


Favorit:

Download
13.77Kb
Persentase antivirus yang mendeteksi ancaman: 0%
Lihat laporan scan virus

Videos


Kamu harus login untuk menambahkan video ke mod ini.

Deskripsi

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.

Sudah ada 9 komentar.

GVModBadge modder
Kingpin
204
Profil
05/28/2020 01:17



Kutip | Balas | (0)
Ztalker867Badge modder
Kingpin
106
Profil
05/16/2020 05:53

nice hud men!

Kutip | Balas | (0)
MiRuLL
Crew Enforcer
50
Profil
05/13/2020 12:09



Kutip | Balas | (0)
papai102Badge modder
Criminal Mastermind
627
Profil
05/12/2020 03:58



Kutip | Balas | (0)
Uchiha Batuhan
Wheelman
19
Profil
05/12/2020 00:08

Good Man.

Kutip | Balas | (3)
FiR2020Badge modder
Los Santos Veteran
506
Profil
05/11/2020 20:06



Kutip | Balas | (0)
VitalBadge modder
Kingpin
7
Profil
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.

Kutip | Balas | (1)
KingSam
Wheelman
17
Profil
05/11/2020 18:18

WOW

Kutip | Balas | (0)
DavidstrsBadge modder
Los Santos Veteran
898
Profil
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

Kutip | Balas | (2)