Raised This Month: $51 Target: $400
 12% 

[CSGO] env_spritetrail not working?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zylius
SourceMod Donor
Join Date: Nov 2009
Old 08-26-2012 , 13:11   [CSGO] env_spritetrail not working?
Reply With Quote #1

Greetings, I'm trying to get env_spritetrail to work with CS:GO. It worked "a bit" few updates back. It would spawn for a few seconds after creation and then disappear. (entity would still exist, it would just be invisible)
Here is the code I've written trying to test it. I've tested it in CS:S, works really well. Not so in CSGO sadly.
PHP Code:
#include <SDKTools>
#define TailModel "materials/sprites/laserbeam.vmt"
new tail;
public 
OnPluginStart()
{
    
RegAdminCmd("sm_tt"TailTestADMFLAG_ROOT); 
    
PrecacheModel(TailModeltrue);
}
public 
Action:TailTest(client,args)
{    
    if(
IsValidEntity(tail))
    {
        
PrintToChat(client"Killed your tail");
        
AcceptEntityInput(tail"Kill");
        
tail = -1;
        return;
    }
    
tail CreateEntityByName("env_spritetrail");
    if (!
IsValidEdict(tail))
    {
        
LogError("Can't create entity Client:%N Index:%i"clienttail);
        
tail = -1;
        return;
    }
    
decl String:parentName[64], Float:vPosClient[3];
    
GetClientName(clientparentNamesizeofparentName ));
    
PrintToChat(client"Attaching tail %i to %N"tailclient);
    
Format(parentNamesizeof(parentName), "%i:%s"clientparentName);
    
DispatchKeyValue(client"targetname"parentName);
    
DispatchKeyValue(tail"parentname""A tail");
    
DispatchKeyValue(tail"lifetime""5"); 
    
DispatchKeyValue(tail"startwidth""10");
    
DispatchKeyValue(tail"endwidth""1");
    
DispatchKeyValue(tail"spritename"TailModel);
    
DispatchKeyValue(tail"renderamt""255");
    
DispatchKeyValue(tail"rendercolor""255 255 255");
    
DispatchKeyValue(tail"rendermode""4");
    
DispatchSpawn(tail);
    
GetClientAbsOrigin(clientvPosClient);
    
TeleportEntity(tailvPosClientNULL_VECTORNULL_VECTOR);
    
SetVariantString(parentName);
    
AcceptEntityInput(tail"SetParent");
    
SetVariantString("grenade0");
    
AcceptEntityInput(tail"SetParentAttachmentMaintainOffset");
    return;
}
public 
OnPLuginEnd()
{
    if(
IsValidEntity(tail))
        
AcceptEntityInput(tail"Kill");

I get no errors, warnings whatsoever. The entity gets spawned, but isn't visible.

Last edited by Zylius; 08-26-2012 at 13:14.
Zylius is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 08-26-2012 , 13:50   Re: [CSGO] env_spritetrail not working?
Reply With Quote #2

Quote:
Originally Posted by Zylius View Post
Greetings, I'm trying to get env_spritetrail to work with CS:GO. It worked "a bit" few updates back. It would spawn for a few seconds after creation and then disappear. (entity would still exist, it would just be invisible)
Here is the code I've written trying to test it. I've tested it in CS:S, works really well. Not so in CSGO sadly.
PHP Code:
#include <SDKTools>
#define TailModel "materials/sprites/laserbeam.vmt"
new tail;
public 
OnPluginStart()
{
    
RegAdminCmd("sm_tt"TailTestADMFLAG_ROOT); 
    
PrecacheModel(TailModeltrue);
}
public 
Action:TailTest(client,args)
{    
    if(
IsValidEntity(tail))
    {
        
PrintToChat(client"Killed your tail");
        
AcceptEntityInput(tail"Kill");
        
tail = -1;
        return;
    }
    
tail CreateEntityByName("env_spritetrail");
    if (!
IsValidEdict(tail))
    {
        
LogError("Can't create entity Client:%N Index:%i"clienttail);
        
tail = -1;
        return;
    }
    
decl String:parentName[64], Float:vPosClient[3];
    
GetClientName(clientparentNamesizeofparentName ));
    
PrintToChat(client"Attaching tail %i to %N"tailclient);
    
Format(parentNamesizeof(parentName), "%i:%s"clientparentName);
    
DispatchKeyValue(client"targetname"parentName);
    
DispatchKeyValue(tail"parentname""A tail");
    
DispatchKeyValue(tail"lifetime""5"); 
    
DispatchKeyValue(tail"startwidth""10");
    
DispatchKeyValue(tail"endwidth""1");
    
DispatchKeyValue(tail"spritename"TailModel);
    
DispatchKeyValue(tail"renderamt""255");
    
DispatchKeyValue(tail"rendercolor""255 255 255");
    
DispatchKeyValue(tail"rendermode""4");
    
DispatchSpawn(tail);
    
GetClientAbsOrigin(clientvPosClient);
    
TeleportEntity(tailvPosClientNULL_VECTORNULL_VECTOR);
    
SetVariantString(parentName);
    
AcceptEntityInput(tail"SetParent");
    
SetVariantString("grenade0");
    
AcceptEntityInput(tail"SetParentAttachmentMaintainOffset");
    return;
}
public 
OnPLuginEnd()
{
    if(
IsValidEntity(tail))
        
AcceptEntityInput(tail"Kill");

I get no errors, warnings whatsoever. The entity gets spawned, but isn't visible.
Make sure the trail material is a material CS:GO supports.
Mitchell is offline
Zylius
SourceMod Donor
Join Date: Nov 2009
Old 08-26-2012 , 13:57   Re: [CSGO] env_spritetrail not working?
Reply With Quote #3

Quote:
Originally Posted by Mitchell View Post
Make sure the trail material is a material CS:GO supports.
Are you talking about the laserbeam.vmt? Yeah it's in the VPK files, and as I've said it worked "a little" few updates before. Maybe someone knows other ones I could try? I tried most of them in the materials/sprites folder, nothing.
Zylius is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 08-26-2012 , 14:13   Re: [CSGO] env_spritetrail not working?
Reply With Quote #4

try physbeam instead , I use this in csgo_bullettime for the tracers.....
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
Zylius
SourceMod Donor
Join Date: Nov 2009
Old 08-26-2012 , 14:24   Re: [CSGO] env_spritetrail not working?
Reply With Quote #5

Quote:
Originally Posted by andi67 View Post
try physbeam instead , I use this in csgo_bullettime for the tracers.....
Tried it, but to no avail
Zylius is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 08-26-2012 , 14:51   Re: [CSGO] env_spritetrail not working?
Reply With Quote #6

Quote:
Originally Posted by Zylius View Post
Tried it, but to no avail
Did you ActivateEntity?
Mitchell is offline
Zylius
SourceMod Donor
Join Date: Nov 2009
Old 08-26-2012 , 15:08   Re: [CSGO] env_spritetrail not working?
Reply With Quote #7

Quote:
Originally Posted by Mitchell View Post
Did you ActivateEntity?
Yeah, I've tried it now but it's still not working.
Zylius is offline
tumtum
Senior Member
Join Date: Aug 2012
Old 09-09-2012 , 08:09   Re: [CSGO] env_spritetrail not working?
Reply With Quote #8

Quote:
Originally Posted by Zylius View Post
Yeah, I've tried it now but it's still not working.
Yeah! I want it too! Valve go fix it! I want trails.
tumtum 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 04:27.


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