View Single Post
101
Member
Join Date: Nov 2023
Old 01-23-2024 , 00:09   Re: Plugin not compile [ZPS]
Reply With Quote #4

Quote:
Originally Posted by ORdli View Post
as far as I know it worked on older versions of the game, I found it from old builds for creating unofficial ready-made servers for zombie panic on github.
Noway ,everything here is wrong , the code , the logic , the sense and also ur answers .
If i were u , I would request some help like this :
My Game is :X . my goal with - exact manner - is :N , and here is my "full" code :S ,but the problem i have faced is :Z ,
and here some report :P
Quote:
Reports :
C:\game\X\addons\R\Y\*.smx : error 100: function F does not make sense
C:\game\X\addons\R\Y\*.smx : error 101: You can't use MaxClients that has a limit range [32-100] While You Are Searching For a Non-Human Stuff that index might be 1000 , Use GetMaxEntities() Instead .
C:\game\X\addons\R\Y\*.smx : error 102: GetClassName() is undefined , Note : ClassNames of clients seats that refers to "MaxClients" will never match string "func_breakable".
...
...
ATM , i have to guess a solution for a random game "Zombie Panic! Source" like this , but i still don't understand the main purpose :
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");
    }
    
    
char className[32];
    
GetEdictClassname(Eye_TargetclassName32);
    
    if (
StrContains(className"func_break" ,false) != -1)
    {
        
int Health GetEntProp(Eye_TargetProp_Data"m_iHealth"00);
        
int MHealth GetEntProp(Eye_TargetProp_Data"m_iMaxHealth"00);
        
PrintHintText("Health[ %d / %d ]" Health MHealth );
    }
    return 
Plugin_Continue;
}

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

This will print a hint message when a human aims at a breakable entity (I guess So) .

Last edited by 101; 01-23-2024 at 00:14.
101 is offline