I saw in sdktools_tempents_stocks.inc file some stocks for setup different stuffs but those aren't all. I made new ownes
Code:
#include <sourcemod>
#include <sdktools>
#pragma semicolon 1
public Plugin:myinfo =
{
name = "New SM Plugin",
author = "SAMURAI",
description = "Example of a Dynamic Light effect",
version = "1.0",
url = "wtf :)"
}
public OnPluginStart()
{
RegConsoleCmd("test1",testCmd,"dynamic light");
}
public Action:testCmd(id, args)
{
new Float:origin[3];
GetClientAbsOrigin(id,origin);
new r = 255;
new g = 0;
new b = 255;
new exponent = 50;
new Float:radius = 105.0;
new Float:time = 10.0;
new Float:decay = 80.0;
TE_SetupDynamicLight(origin,r,g,b,exponent,radius,time,decay);
TE_SendToAll();
}
/**
* Sets up a Dynamic Light effect
*
* @param vecOrigin Position of the Dynamic Light
* @param r r color value
* @param g g color value
* @param b b color value
* @param iExponent ?
* @param fTime Duration
* @param fDecay Decay of dynamic light
* @noreturn
*/
stock TE_SetupDynamicLight(const Float:vecOrigin[3], r,g,b,iExponent,Float:fRadius,Float:fTime,Float:fDecay)
{
TE_Start("Dynamic Light");
TE_WriteVector("m_vecOrigin",vecOrigin);
TE_WriteNum("r",r);
TE_WriteNum("g",g);
TE_WriteNum("b",b);
TE_WriteNum("exponent",iExponent);
TE_WriteFloat("m_fRadius",fRadius);
TE_WriteFloat("m_fTime",fTime);
TE_WriteFloat("m_fDecay",fDecay);
}
It's generate a dynamic light at origin of client who use command "test1" in console