Raised This Month: $ Target: $400
 0% 

[CS:GO] Trails not working


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Pyro_
Senior Member
Join Date: Oct 2013
Old 12-15-2013 , 05:46   [CS:GO] Trails not working
Reply With Quote #1

PHP Code:
new String:pName[64];
    
Format(pNamesizeof(pName), "cl:%d"client);

    new 
entTrail CreateEntityByName("env_spritetrail");
    if(
entTrail != -1)
    {
        
trails[client] = entTrail;

        
DispatchKeyValue(client"targetname"pName);
        
DispatchKeyValue(entTrail"parentname"pName);
        
DispatchKeyValue(entTrail"lifetime""15.0");
        
DispatchKeyValue(entTrail"startwidth""10.0");
        
DispatchKeyValue(entTrail"endwidth""1.0");
        
DispatchKeyValue(entTrail"spritename""materials/sprites/crystal_beam1.vmt");
        
DispatchKeyValue(entTrail"renderamt""255");
        
DispatchKeyValue(entTrail"rendercolor""255 255 255");
        
DispatchKeyValue(entTrail"rendermode""4");
        
DispatchSpawn(entTrail);

        new 
Float:pos[3];
        
GetClientAbsOrigin(clientpos);
        
pos[2] += 10.0;
        
TeleportEntity(entTrailposNULL_VECTORNULL_VECTOR);

        
SetVariantString(pName);
        
AcceptEntityInput(entTrail"SetParent");
    } 
When I call this on my player (I also tried parenting it to a grenade), the trail appears for a short amount of time and disappears randomly, but not only that; but the trail is a straight line from the place it is teleported to and where the parent is. Why is that and how can I fix it?
Pyro_ 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 11:15.


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