View Single Post
Author Message
SAMURAI16
BANNED
Join Date: Sep 2006
Old 04-01-2008 , 09:39   [STOCKS] New tempents stocks
Reply With Quote #1

Hello
I saw in sdktools_tempents_stocks.inc file some stocks for setup different stuffs but those aren't all. I made new ownes

Here is an example for create a dynamic light effect:
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
Attached Files
File Type: sp Get Plugin or Get Source (new_tempents_stocks.sp - 900 views - 8.9 KB)

Last edited by SAMURAI16; 04-04-2008 at 10:11.
SAMURAI16 is offline
Send a message via MSN to SAMURAI16