Raised This Month: $ Target: $400
 0% 

Problem Entity Origin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Arje
Senior Member
Join Date: Apr 2020
Location: Córdoba, Argentina
Old 02-15-2022 , 07:50   Problem Entity Origin
Reply With Quote #1

Hi, well my problem is that I would like the entity to appear higher than it appears, but I can't get it, it always stays as in the image.

Another problem is that I would like to change the color of the model, is it possible? use glow at the end but would like to change its color if possible

PHP Code:
new iUserPet[33]

CreateSusa(id)
{
    new 
susanowner id
    
new susanoo create_entity("info_target")
    
    if ( !
pev_valid(susanoo) ) return;
    
    
set_pev(susanoopev_classname"susanoo")        // name of ent
    
entity_set_model(susanoo"models/shmod/susanoo.mdl")    // model
    
    
    // I Try this for change the origin but not found
    
new Float:Origin[3], Float:vOrigin[3]
    
//get_user_origin(susanowner, Origin, 1)
    
pev(susanownerpev_originOrigin)
    
Origin[2]+= 50
    
    vOrigin
[0] += Origin[0]
    
vOrigin[1] += Origin[1]  
    
vOrigin[2] += Origin[2]
    
//engfunc(EngFunc_SetOrigin, susanoo, vOrigin)
    
set_pev(susanoopev_originvOrigin );
    
    
set_pev(susanoopev_movetypeMOVETYPE_FOLLOW)        // follor player id
    
set_pev(susanoopev_aimentsusanowner)        // owner    
    
set_pev(susanoopev_framerate1.0)            // This is for animation? 
    
set_pev(susanoopev_animtimeget_gametime())        // This is for animation? 
    
    // What is sequence?
    
set_pev(susanoopev_sequence0)            // ?
    
    // I use this for glow
    
set_rendering(susanookRenderFxGlowShell1540210kRenderNormal25);
     
/*
    //  -----  But i tried to use this to change the color of the model but not found    -----
     ---------------------------------------------------------------------------
     
    new Float:fVecColor[3] // = {154.0, 0.0, 210.0} 
    fVecColor[0]=float(154.0);
    fVecColor[1]=float(0.0);
    fVecColor[2]=float(210.0);
    new Float:flAmount = 0.0
    //Float:{LOCKED_COLOR}
    set_pev(susanoo, pev_renderfx, kRenderFxNone)
    set_pev(susanoo, pev_rendercolor, fVecColor )
    set_pev(susanoo, pev_rendermode, kRenderNormal) 
    set_pev(susanoo, pev_renderamt, flAmount)
    
    set_pev(susanoo, pev_rendermode, kRenderTransColor)
    set_rendering(susanoo, kRenderTransColor, 154, 0, 210)
    */
    
    
iUserPet[id] = susanoo;
    
client_print(susanownerprint_chat"Tenes susanoo:")
    



and another question I tried to put life into the entity and it would take damage, but it just doesn't, is this ok?

PHP Code:
   new Float:p_cvar_health get_pcvar_float(phealth); 
    
set_pev(susanoopev_solidSOLID_BBOX); // touch on edge, block  
    
set_pev(susanoopev_healthp_cvar_health); // X hp para entidad
    
set_pev(susanoopev_takedamageDAMAGE_YES); // daños activado 
Arje 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 07:05.


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