Raised This Month: $ Target: $400
 0% 

Plugin not compile [ZPS]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ORdli
Member
Join Date: Nov 2021
Old 01-21-2024 , 18:36   Plugin not compile [ZPS]
Reply With Quote #1

PHP Code:
#include <sourcemod>

public void OnMapStart()
{
    
CreateTimer(1.0Timer_DisplayHealthTIMER_REPEAT);
}

public 
Action Timer_DisplayHealth(Handle:timer)
{
    for (
int entity 1entity <= MaxClientsentity++)
    {
        if (!
IsValidEntity(entity))
            continue;

        if (
GetClassname(entity) == "func_breakable")
        {
            
int health GetEntProp(entityProp_Data"m_iHealth"00);
            
int maxHealth GetEntProp(entityProp_Data"m_iMaxHealth"00);
            if (
health >= && maxHealth >= 0)
            {
                
ShowHealthInfoToClient(entityhealthmaxHealth);
            }
        }
    }
    return 
Plugin_Continue;
}

public 
Action ShowHealthInfoToClient(int clientint healthint maxHealth)
{
    
PrintToChat(client"Prop health: %d / %d"healthmaxHealth);
    return 
Plugin_Continue;


The plugin displayed the amount of HP for breaking objects in the game such as doors and barricades, but on the new version 3.2.7 it no longer works, what’s wrong and what’s the matter?
the plugin displayed the amount of remaining HP for objects in the game like func_breakable and physical props, something like show damage only for collapsing obje.

Last edited by DarkDeviL; 01-21-2024 at 23:34. Reason: Added CODE tag
ORdli is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode