Raised This Month: $ Target: $400
 0% 

Bind smoke to player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shouldercannon
BANNED
Join Date: Sep 2009
Location: Russia, Penza
Old 12-28-2010 , 13:56   Bind smoke to player
Reply With Quote #1

How to bind smoke to player?
Shouldercannon is offline
Send a message via ICQ to Shouldercannon
FaTony
Veteran Member
Join Date: Aug 2008
Old 12-28-2010 , 17:37   Re: Bind smoke to player
Reply With Quote #2

Attach?
__________________
FaTony is offline
Shouldercannon
BANNED
Join Date: Sep 2009
Location: Russia, Penza
Old 12-29-2010 , 01:53   Re: Bind smoke to player
Reply With Quote #3

Yes
Shouldercannon is offline
Send a message via ICQ to Shouldercannon
Monkeys
Veteran Member
Join Date: Jan 2010
Old 12-29-2010 , 03:35   Re: Bind smoke to player
Reply With Quote #4

Parent the smoke entity to the player.
__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.
Monkeys is offline
Shouldercannon
BANNED
Join Date: Sep 2009
Location: Russia, Penza
Old 12-29-2010 , 06:09   Re: Bind smoke to player
Reply With Quote #5

If let the smoke from a position player?
Shouldercannon is offline
Send a message via ICQ to Shouldercannon
FaTony
Veteran Member
Join Date: Aug 2008
Old 12-29-2010 , 06:11   Re: Bind smoke to player
Reply With Quote #6

Чего?
__________________
FaTony is offline
Shouldercannon
BANNED
Join Date: Sep 2009
Location: Russia, Penza
Old 12-29-2010 , 06:24   Re: Bind smoke to player
Reply With Quote #7

Пустить дым с позиции, на которой находится игрок.
Shouldercannon is offline
Send a message via ICQ to Shouldercannon
FaTony
Veteran Member
Join Date: Aug 2008
Old 12-29-2010 , 07:02   Re: Bind smoke to player
Reply With Quote #8

Кромсай:
PHP Code:
bool:TrailManager_EnableSmokestack(const client)
{
    
decl String:material[PLATFORM_MAX_PATH];
    if (!
Config_GetMaterial(TrailsBuffer[client][smokestackmaterialindex], material))
    {
        
TrailsBuffer[client][shouldbeenabled] = false;
        return 
false;
    }
    new 
entity CreateEntityByName("env_smokestack");
    if (
entity == -1)
    {
        
PrintToChat(client"[Trails] Unable to create your trail. Please contact server admin.");
        
LogError("[Trails] Unable to create trail.");
        return 
false;
    }
    
SetEntityRenderColor(entityTrailsBuffer[client][color][0], TrailsBuffer[client][color][1], TrailsBuffer[client][color][2], TrailsBuffer[client][color][3]);
    
DispatchKeyValue(entity"SmokeMaterial"material);
    
DispatchKeyValue(entity"basespread"SMOKESTACK_BASESPREAD);
    
DispatchKeyValue(entity"spreadspeed"SMOKESTACK_SPREADSPEED);
    
DispatchKeyValue(entity"initial"SMOKESTACK_INITIAL);
    
DispatchKeyValue(entity"speed"SMOKESTACK_SPEED);
    
DispatchKeyValue(entity"startsize"SMOKESTACK_STARTSIZE);
    
DispatchKeyValue(entity"endsize"SMOKESTACK_ENDSIZE);
    
DispatchKeyValue(entity"rate"SMOKESTACK_RATE);
    
DispatchKeyValue(entity"jetlength"SMOKESTACK_JETLENGTH);
    
DispatchKeyValue(entity"twist"SMOKESTACK_TWIST);
    
DispatchKeyValue(entity"angles"SMOKESTACK_ANGLES);
    
DispatchKeyValue(entity"rendermode"SMOKESTACK_RENDERMODE);
    
DispatchKeyValue(entity"renderamt"SMOKESTACK_RENDERAMT);
    
decl Float:clientposition[3];
    
GetClientAbsOrigin(clientclientposition);
    
TeleportEntity(entityclientpositionNULL_VECTORNULL_VECTOR);
    
DispatchSpawn(entity);
    
AcceptEntityInput(entity"TurnOn");
    
SetVariantString("!activator");
    
AcceptEntityInput(entity"SetParent"cliententity);
    
TrailsBuffer[client][type] = EFFECT_SMOKESTACK;
    
TrailsBuffer[client][smokestackentityref] = EntIndexToEntRef(entity);
    return 
true;

__________________
FaTony is offline
Shouldercannon
BANNED
Join Date: Sep 2009
Location: Russia, Penza
Old 12-29-2010 , 14:56   Re: Bind smoke to player
Reply With Quote #9

Проще
PHP Code:
    new victim GetClientOfUserId(GetEventInt(event"userid"));

    
decl Float:origin[3];
    
GetClientAbsOrigin(victimorigin);

    
TE_SetupSmoke(origing_iSmokeModel50.01);
    
TE_SendToAll(); 
можно самому задавать цвет дыма с помощью RGB, а не с помощью материалов?
Shouldercannon is offline
Send a message via ICQ to Shouldercannon
FaTony
Veteran Member
Join Date: Aug 2008
Old 12-29-2010 , 15:29   Re: Bind smoke to player
Reply With Quote #10

Через твою функцию - нет.
__________________
FaTony 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:10.


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