This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[CSS] Spark effect on player


Post New Thread Reply   
 
Thread Tools Display Modes
altex
Veteran Member
Join Date: May 2009
Location: Russia
Old 12-28-2009 , 18:56   Re: [CSS] Spark effect on player
Reply With Quote #11

Oh, this effect in real game looks much better.

Code:
#include <sourcemod>
#include <sdktools>

#pragma semicolon 1

public Plugin:myinfo =
{
    name = "Test2",
    author = "Otstrel.ru Team",
    description = "Test2",
    version = "1",
    url = "http://otstrel.ru"
};

new Handle:g_timers[MAXPLAYERS+1];

public OnPluginStart()
{
    HookEvent("weapon_fire", _WeaponFire);
    HookEvent("player_death", _PD);
}

public _WeaponFire(Handle:event, const String:name[], bool:dontBroadcast)
{
    new client = GetClientOfUserId(GetEventInt(event, "userid"));
    
    if ( g_timers[client] == INVALID_HANDLE )
    {
        g_timers[client] = CreateTimer(0.2, Timer_Spark, client, TIMER_REPEAT);
    }
}

public _PD(Handle:event, const String:name[], bool:dontBroadcast)
{
    new client = GetClientOfUserId(GetEventInt(event, "userid"));
    
    if ( g_timers[client] != INVALID_HANDLE )
    {
        KillTimer(g_timers[client]);
        g_timers[client] = INVALID_HANDLE;
    }
}

public Action:Timer_Spark(Handle:timer, any:client)
{
    if (!IsClientInGame(client) || !IsPlayerAlive(client))
    {
        return Plugin_Stop;
    }
    decl Float:fPos[3],Float:dir[3];
    GetClientAbsOrigin(client, fPos);
    TE_SetupSparks(fPos, dir, 8, 3);
    TE_SendToAll(); 
    return Plugin_Continue;
}
But in the first 10 seconds it almost without sparks too ((
__________________

Last edited by altex; 12-28-2009 at 19:18.
altex is offline
altex
Veteran Member
Join Date: May 2009
Location: Russia
Old 12-29-2009 , 03:28   Re: [CSS] Spark effect on player
Reply With Quote #12

Where can i find descriptions of all the effects than engine can provide? I just want to find effect, that can point to a player with god mod enabled so other players can easyly find him and run away ))

As a spark effect works strange to me (in the first 10 seconds it can just not produce sparks almost for 5 seconds in a row) i'm trying to find something else.

Maybe there is an effect like golden glow around the player?
__________________
altex is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 12-29-2009 , 06:14   Re: [CSS] Spark effect on player
Reply With Quote #13

Try to change Magnitude and TrailLength of sparks.
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
altex
Veteran Member
Join Date: May 2009
Location: Russia
Old 12-29-2009 , 17:40   Re: [CSS] Spark effect on player
Reply With Quote #14

Quote:
Originally Posted by exvel View Post
Try to change Magnitude and TrailLength of sparks.
It did not realy helped.
__________________
altex is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:48.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode