Пользователь
		- Регистрация
 - 2 Апр 2025
 
- Сообщения
 - 34
 
- Автор темы
 - #1
 
на лаунчере арз что то начудили со смертью, устанавливаю игроку 0 хп то он не умирает, как исправить?
			
			Зарегистрировавшись у нас, вы сможете обсуждать, делиться и отправлять личные сообщения другим участникам нашего сообщества.
Зарегистрироваться!Скорее всего, дело в моде, поменяйте модна лаунчере арз что то начудили со смертью, устанавливаю игроку 0 хп то он не умирает, как исправить?
Скорее всего, дело в моде, поменяйте мод
stock AC_SetPlayerHealth(playerid, Float:health) {
    if(!IsPlayerConnected(playerid)) return 0;
   
    new Float:oldHealth;
    GetPlayerHealth(playerid, oldHealth);
   
    if(health < 0.0) health = 0.0;
   
    new Float:maxHealth = GetPlayerMaxHealth(playerid);
    if(health > maxHealth) health = maxHealth;
   
    if(health <= 0.0) {
   
       
        PI[playerid][pHealth] = 0.0;
        SetPlayerHealth(playerid, 0.0);
        ClearAnimations(playerid);
       
        //SpawnPlayer(playerid);
       
        return 1;
    }
   
    SetPlayerHealth(playerid, health);
    PI[playerid][pHealth] = health;
   
    new Float:healthDiff = health - oldHealth;
    if(healthDiff != 0.0) {
        new str[64];
        if(healthDiff > 0.0) {
            format(str, sizeof(str), "+ %.0f HP", healthDiff);
        } else {
            format(str, sizeof(str), "%.0f HP", healthDiff);
        }
        GameTextForPlayer(playerid, str, 500, 1);
    }
    return 1;
}
	public OnPlayerDeath(playerid, killerid, reason) {
    if(IsPlayerLogged[playerid] == 0) return Bypasser(playerid, "OnPlayerDeath");
    ApplyAnimation(playerid, "PED", "KO_SHOT_FRONT", 4.1, 0, 1, 1, 1, 0, 1);
    SCMf(playerid, COLOR_RED, "[DEBUG] OnPlayerDeath: playerid %d, killerid: %d, reason: %d", playerid, killerid, reason);
    return 1;
}
	к чему это?Pawn:stock AC_SetPlayerHealth(playerid, Float:health) { if(!IsPlayerConnected(playerid)) return 0; new Float:oldHealth; GetPlayerHealth(playerid, oldHealth); if(health < 0.0) health = 0.0; new Float:maxHealth = GetPlayerMaxHealth(playerid); if(health > maxHealth) health = maxHealth; if(health <= 0.0) { PI[playerid][pHealth] = 0.0; SetPlayerHealth(playerid, 0.0); ClearAnimations(playerid); //SpawnPlayer(playerid); return 1; } SetPlayerHealth(playerid, health); PI[playerid][pHealth] = health; new Float:healthDiff = health - oldHealth; if(healthDiff != 0.0) { new str[64]; if(healthDiff > 0.0) { format(str, sizeof(str), "+ %.0f HP", healthDiff); } else { format(str, sizeof(str), "%.0f HP", healthDiff); } GameTextForPlayer(playerid, str, 500, 1); } return 1; }
да, а вот как это уже секрет@friskovikov_, мб пофиксить как то можно?
до чего скатались павн девлоперы в 2025 ...да, а вот как это уже секрет
пуфн девепоперы вообще-та, имей уважение к великому пуфнудо чего скатались павн девлоперы в 2025 ...
Нашёл альтернативное решение, при смерти спавнить игрока)