A ka mundesi edhe 1 her dikush me ma editu qit plugins se osht ka paraqet shum errora edhe o ka e nal serverin , ky dosti rangers one ma pat nreq po spata mujt me marr e tash ish fshi prej sendspace :/
Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#if AMXX_VERSION_NUM < 183
#include <colorchat>
#endif
new RequiredEnt
new bool:HasUsedButton
public plugin_init()
{
register_plugin("[ZE] Heli Button Info", "1.0", "r0ck")
new iEnt1 = -1, iEnt2 = -1, Float:fspeed, Float:origin[3], Float:origin2[3], Float:fdistance, Float:ShortDistance = 99999.9, bool:FoundEnt
while((iEnt1 = engfunc(EngFunc_FindEntityByString, iEnt1 , "classname", "path_track")) != 0)
{
pev(iEnt1, pev_speed, fspeed)
if(2.0 < fspeed < 40.0)
{
pev(iEnt1, pev_origin, origin)
//log_amx("track origin %f %f %f", origin[0], origin[1], origin[2])
while((iEnt2 = engfunc(EngFunc_FindEntityByString, iEnt2 , "classname", "func_button")) != 0)
{
fm_get_brush_entity_origin(iEnt2, origin2)
fdistance = get_distance_f(origin, origin2)
if(fdistance < ShortDistance)
{
RequiredEnt = iEnt2
ShortDistance = fdistance
//log_amx("ent %i distance %f", iEnt2, fdistance)
}
FoundEnt = true
}
break
}
}
if(!FoundEnt)
{
while((iEnt1 = engfunc(EngFunc_FindEntityByString, iEnt1 , "classname", "trigger_multiple")) != 0)
{
fm_get_brush_entity_origin(iEnt1, origin)
//log_amx("trigger origin %f %f %f", origin[0], origin[1], origin[2])
while((iEnt2 = engfunc(EngFunc_FindEntityByString, iEnt2 , "classname", "func_button")) != 0)
{
fm_get_brush_entity_origin(iEnt2, origin2)
fdistance = get_distance_f(origin, origin2)
if(fdistance < ShortDistance)
{
RequiredEnt = iEnt2
ShortDistance = fdistance
//log_amx("ent %i distance %f", iEnt2, fdistance)
}
FoundEnt = true
}
break
}
}
if(FoundEnt)
{
register_logevent("Event_RoundStart", 2, "0=World triggered", "1=Round_Start")
RegisterHam(Ham_Use, "func_button", "fwButtonUsed")
}
else
set_fail_state("[ZE] Zombie Escape Button not found.")
}
public Event_RoundStart()
HasUsedButton = false
public fwButtonUsed(ent, idcaller)
{
if(!HasUsedButton && ent == RequiredEnt)
{
new szName[33]; get_user_name(idcaller, szName, charsmax(szName))
ColorChat(0, GREEN, "[Zombie Escape]^3 %s^1 used the^4 escape button!", szName)
HasUsedButton = true
}
}
stock fm_get_brush_entity_origin(index, Float:origin[3])
{
new Float:mins[3], Float:maxs[3];
pev(index, pev_origin, origin);
pev(index, pev_mins, mins);
pev(index, pev_maxs, maxs);
origin[0] += (mins[0] + maxs[0]) * 0.5;
origin[1] += (mins[1] + maxs[1]) * 0.5;
origin[2] += (mins[2] + maxs[2]) * 0.5;
return 1;
}
Kontakto ne Facebook (kliko)
------------------------------------------------------------------------------------------------------
![[Image: b_560_95_1.png]](http://cache.www.gametracker.com/server_info/37.59.72.53:27016/b_560_95_1.png)
![[Image: b_560_95_1.png]](http://cache.www.gametracker.com/server_info/193.192.58.12:27016/b_560_95_1.png)
------------------------------------------------------------------------------------------------------

