Raised This Month: $ Target: $400
 0% 

Plugin not compile [ZPS]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ORdli
Member
Join Date: Nov 2021
Old 01-23-2024 , 13:10   Re: Plugin not compile [ZPS]
Reply With Quote #1

I tested both plugins, the first from 101 works, but the amount of HP is not shown correctly, and not on all objects, it skips prop_physic, the second plugin compiled and works but it does not show anything, the essence of the plugin was that it showed how much HP remains of an object being destroyed when damage is dealt, for example, there is a barricade on the map that has 2000 HP; when damage is dealt, information is shown in the center of the screen about how much HP is left for the barricade to break it or for any physical object in the game that can be broken, be it is this a door or a drawer!
ORdli is offline
101
Member
Join Date: Nov 2023
Old 01-26-2024 , 14:30   Re: Plugin not compile [ZPS]
Reply With Quote #2

Quote:
Originally Posted by ORdli View Post
I tested both plugins, the first from 101 works, but the amount of HP is not shown correctly, and not on all objects, it skips prop_physic
That because u requested a script to only show the breakable shit , try this: ( if u want some additional details) then reply .

PHP Code:
#include <sdktools_functions>

#define Timer_Refresh    1.0

new Handle:h_timer[MAXPLAYERS+1];

public 
OnPluginStart() 
{
    
HookEvent("player_spawn",E_P_S);
}

public 
E_P_S(Handle:event, const String:name[], bool:Broadcast
{
    new 
GetEventInt(event,"entindex");
    if ( !
IsFakeClient(P) &&  h_timer[P] ==null )
    {
        
h_timer[P]=CreateTimer(Timer_Refresh ,Timer_DisplayHealthTIMER_REPEAT);
    }
}

public 
Action Timer_DisplayHealth(Handle Timer,any P)
{
    
int Eye_Target GetClientAimTarget(Pfalse);
    
    switch ( 
Eye_Target)
    {
        case -
: return Plugin_Continue;
        case -
SetFailState("This Function Is Not Supported");
    }
    
    
int Health GetEntProp(Eye_TargetProp_Data"m_iHealth");

    if ( 
Health>)
    {
        
PrintHintText("Health[ %d ]" Health);
    }
    return 
Plugin_Continue;
}

public 
OnClientDisconnect(P)
{
    if (
h_timer[P]!=null)
        
delete h_timer[P];


Last edited by 101; 01-26-2024 at 14:32.
101 is offline
Reply


Thread Tools
Display Modes

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 05:02.


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