Quote:
Originally Posted by ORdli
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 P = GetEventInt(event,"entindex");
if ( !IsFakeClient(P) && h_timer[P] ==null )
{
h_timer[P]=CreateTimer(Timer_Refresh ,Timer_DisplayHealth, P , TIMER_REPEAT);
}
}
public Action Timer_DisplayHealth(Handle Timer,any P)
{
int Eye_Target = GetClientAimTarget(P, false);
switch ( Eye_Target)
{
case -1 : return Plugin_Continue;
case -2 : SetFailState("This Function Is Not Supported");
}
char className[32];
GetEdictClassname(Eye_Target, className, 32);
if (StrContains(className, "func_break" ,false) != -1)
{
int Health = GetEntProp(Eye_Target, Prop_Data, "m_iHealth", 0, 0);
int MHealth = GetEntProp(Eye_Target, Prop_Data, "m_iMaxHealth", 0, 0);
PrintHintText(P , "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) .