Raised This Month: $ Target: $400
 0% 

env_fire offsetting on new playermodel


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Knox Kye
New Member
Join Date: Apr 2016
Old 04-14-2016 , 20:37   env_fire offsetting on new playermodel
Reply With Quote #1

Hey guys,
I was coding a race for the war3source mod for CSS.
And I was creating a race that changed you into the crow player model and let you fly. All the while having a env_fire on my body but with negated damage.
Every time I go from the original player model to the crow the flame offsets to about a metre or two behind me. I know this from using the third-person plugin.

I did a vector check to post to chat my position but it doesnt change when I switch to the bird.
Here's the code for the flame.
PHP Code:
public Action:FireWalk(Handle:timer,any:client)
{
    if(
War3_GetRace(client)==thisRaceID && IsPlayerAlive(client))
    {
        new 
Float:pos[3];
        
GetClientAbsOrigin(client,pos);
        new 
fire CreateEntityByName("env_fire");
        
SetEntPropEnt(fireProp_Send"m_hOwnerEntity"client);
        
DispatchKeyValue(fire"firesize""50");
        
DispatchKeyValue(fire"health""5");
        
DispatchKeyValue(fire"firetype""Normal");
        
DispatchKeyValue(fire"damagescale""0.0");
        
DispatchKeyValue(fire"spawnflags""256");
        
SetVariantString("WaterSurfaceExplosion");
        
AcceptEntityInput(fire"DispatchEffect"); 
        
DispatchSpawn(fire);
        
TeleportEntity(fireposNULL_VECTORNULL_VECTOR);
        
AcceptEntityInput(fire"StartFire");
        
SetVariantString("!activator");
        
AcceptEntityInput(fire"SetParent"client);
        
DispatchKeyValue(fire"extinguish""5.0");
        
CreateTimer(5.0,FireWalk,client);

    }

And this is the code for changing into the bird
PHP Code:
public OnAbilityCommand(client,ability,bool:pressed)
{
    if(
War3_GetRace(client==thisRaceID) && pressed && ValidPlayer(client,true))
    {
        new 
skill_level=War3_GetSkillLevel(client,thisRaceID,SKILL_CROW);
        if(
skill_level>0)        
        {
            if(
War3_SkillNotInCooldown(client,thisRaceID,SKILL_CROW,true)) 
            {
                if(!
bFlying[client])
                {
                    
bFlying[client]=true;
                    
War3_SetBuff(client,bFlyMode,thisRaceID,true);
                    
PrintHintText(client,"Bird Form!");
                    
SetEntityModel(client"models/crow.mdl");
                    
                    new 
weapon=GetPlayerWeaponSlot(client2);
                    if(
weapon>0){
                        
RemovePlayerItem(clientweapon); 
                    }
                }    
                else
                {
                    
CreateTimer(0.1,returnform,client);
                }
                
War3_CooldownMGR(client1.0thisRaceIDSKILL_CROWfalsefalse);
            }
            
        }
        else
        {
            
PrintHintText(client,"Level Your Ultimate First");
        }
    }
}





public 
Action:returnform(Handle:hany:client)
{
    if(
IS_PLAYER(client)&&IS_PLAYER(client))
    {
        
bFlying[client]=false;
        
War3_SetBuff(client,bFlyMode,thisRaceID,false);
        
PrintHintText(client,"Human Form!");
        
GivePlayerItem(client"weapon_knife");
        if(
GetClientTeam(client)==3)
        {
            
SetEntityModel(client"models/player/ct_urban.mdl");
        }
        if(
GetClientTeam(client)==2)
        {
            
SetEntityModel(client"models/player/t_leet.mdl");
        }
    }

Please help

Last edited by Knox Kye; 04-14-2016 at 20:39.
Knox Kye 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 18:34.


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