YSI-Includes
YSI-Includes copied to clipboard
y_classes bug when player die.
I'm having a problem with y_classes, when the player dies, 'OnPlayerDeath' is called, but the life bar keeps blinking, and I can still move the character.
PS: I'm using OS Linux, not been tested on windows, but I believe the same bug also occurs.
Code to reproduce that.
#include <a_samp>
#include <YSI_Visual\y_classes>
#include <YSI_Coding\y_hooks>
#define YSI_NO_HEAP_MALLOC
#define _YSI_NO_VERSION_CHECK
main() {
print("Starting");
}
hook OnGameModeInit() {
Class_Add(123, -2187.0582, 706.6134, 53.8905, 262.5324, WEAPON_GRENADE, 5);
Class_Add(169, -2187.0582, 706.6134, 53.8905, 262.5324, WEAPON_GRENADE, 5);
}
hook OnPlayerRequestClass(playerid, classid) {
SetPlayerCameraPos(playerid, 484.9201, -11.7566, 1000.6796);
SetPlayerCameraLookAt(playerid, 489.4576, -15.1996, 1000.6796);
SetPlayerPos(playerid, 489.4576, -15.1996, 1000.6796);
SetPlayerInterior(playerid, 17);
SetPlayerFacingAngle(playerid, 51.5555);
ApplyAnimation(playerid, "Dancing", "Dan_Loop_A", 5.0, 1, 0, 0, 0, 0);
return Y_HOOKS_CONTINUE_RETURN_1; // Without this, player die, but return to Class Selection.
}
hook OnPlayerSpawn(playerid) {
SetPlayerInterior(playerid, 0);
}
Video reproducing the "bug"
@Y-Less, Can help me? Please
#define YSI_NO_HEAP_MALLOC
#define _YSI_NO_VERSION_CHECK
These should be defined before including any of YSI scripts.
By the way. In the video, you died after you killed yourself with third grenade. Maybe your health was magically at 1 or 2 hp so it started blinking.
And, yeah I am not Y_Less but I was like let's just hop in here LOL