Quote:
Originally Posted by Powerlord
What is the code for NewGlow?
|
Here's
PHP Code:
public Action:NewGlow(Handle:timer,any:obj)
{
if(!IsValidEntity(obj)) return Plugin_Stop;
decl String:sBuffer[PLATFORM_MAX_PATH];
GetEntPropString(obj, Prop_Data, "m_ModelName", sBuffer, sizeof(sBuffer));
if(StrContains(sBuffer, "sentry") != -1)
{
if(StrContains(sBuffer, "heavy") == -1)
{
CreateTimer(0.1,Glow,obj);
if(IsValidEntity(ObjGlow[obj]))
RemoveEdict(ObjGlow[obj]);
//AcceptEntityInput(ObjGlow[obj],"Kill");
ObjGlow[obj] = -1;
return Plugin_Stop;
}
}
else
{
if(StrContains(sBuffer, "light") != -1)
{
CreateTimer(0.1,Glow,obj);
if(IsValidEntity(ObjGlow[obj]))
RemoveEdict(ObjGlow[obj]);
//AcceptEntityInput(ObjGlow[obj],"Kill");
ObjGlow[obj] = -1;
return Plugin_Stop;
}
}
return Plugin_Continue;
}
__________________