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


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
altex
Veteran Member
Join Date: May 2009
Location: Russia
Old 12-27-2009 , 06:23   [CSS] Spark effect on player
Reply With Quote #1

I was trying to implement this ES code in sourcemod
Code:
        cmdFormat = 'es_xgive %s env_spark; ' % attacker
        cmdFormat += 'es_xfire %s env_spark SetParent !activator; ' % attacker
        cmdFormat += 'es_xfire %s env_spark AddOutput "spawnflags 896"; ' % attacker
        cmdFormat += 'es_xfire %s env_spark AddOutput "angles -90 0 0"; ' % attacker
        cmdFormat += 'es_xfire %s env_spark AddOutput "magnitude 8"; ' % attacker
        cmdFormat += 'es_xfire %s env_spark AddOutput "traillength 3"; ' % attacker
        cmdFormat += 'es_xfire %s env_spark StartSpark' % attacker
        es.server.queuecmd(cmdFormat)
That's how i was doing that
Code:
        new String:target[128];
        Format(target, sizeof(target), "target%i", client);
        DispatchKeyValue(client, "targetname", target);
        
        // And even so
        // new String:targetString[128];
        // Format(targetString, sizeof(targetString), "targetname %s", target);
        // SetVariantString(targetString);
        // AcceptEntityInput(client, "AddOutput");
                
        entSpark = CreateEntityByName("env_spark");
        DispatchKeyValue(entSpark, "spawnflags", "896");
        DispatchKeyValue(entSpark, "angles", "-90 0 0");
        DispatchKeyValue(entSpark, "magnitude", "8");
        DispatchKeyValue(entSpark, "traillength", "3");
        // And even so
        // DispatchKeyValue(entSpark, "parentname", target);
        DispatchSpawn(entSpark);
        
        SetVariantString(target);
        AcceptEntityInput(client, "SetParent");
        
        AcceptEntityInput(entSpark, "StartSpark");

        // And even so
        // AcceptEntityInput(entSpark, "StartSpark", client, client);
And it does not work
__________________
altex is offline
 



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 23:38.


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