Raised This Month: $ Target: $400
 0% 

Problem with the entity in the ground


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 05-25-2014 , 10:49   Problem with the entity in the ground
Reply With Quote #1

hello

I have this code to create a entity (ball)

PHP Code:
new Float:pochodzenie[3]

public 
plugin_init() register_clcmd("say /add""DodajPilke")

public 
DodajPilke(id) {
    if(
pev_valid(pilka)) remove_entity_name("ball")

    new 
origin[3]
    
get_user_origin(idorigin3)
    
IVecFVec(originpochodzenie)

    
pochodzenie[2] += 15.0
    StworzPilke
(pochodzenie)
    
ZapiszPilke(pochodzenie)
}

StworzPilke(Float:origin[3] = { 0.00.00.0 }) {
    
pilka create_entity("info_target")

    if(
is_valid_ent(pilka)) {
        
set_pev(pilkapev_classname"ball")
        
set_pev(pilkapev_solid2)
        
set_pev(pilkapev_movetype10)
        
engfunc(EngFunc_SetModelpilkaMODEL_PILKI)
        
engfunc(EngFunc_SetOriginpilkaorigin)
        
engfunc(EngFunc_SetSizepilkaFloat:{ -5.0, -5.00.0 }, Float:{ 5.05.048.0 })
        
set_pev(pilkapev_framerate0.0)
        
set_pev(pilkapev_sequence1)
        
set_pev(pilkapev_skinrandom(3))

        
pochodzenie origin
        stworz_pilke 
true
    
}
    
RegisterHamFromEntity(Ham_Thinkpilka"KopnieciePilki")
    
set_pev(pilkapev_nextthinkget_gametime() + 0.03)

everything is ok except one ... the model is in the ground



what is wrong? what is missing?
OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 05-25-2014 , 11:37   Re: Problem with the entity in the ground
Reply With Quote #2

engfunc(EngFunc_SetSize, pilka, Float:{ -5.0, -5.0, 0.0 }, Float:{ 5.0, 5.0, 48.0 })

Wierd size, the 'solid-box' may be above the midle of the ball, so the rest is under?
__________________
Retired.

Last edited by Xalus; 05-25-2014 at 11:38.
Xalus is offline
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 05-25-2014 , 11:51   Re: Problem with the entity in the ground
Reply With Quote #3

half of the ball is in the ground, I would like that the whole model of the ball was on the ground
OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 05-25-2014 , 14:14   Re: Problem with the entity in the ground
Reply With Quote #4

Quote:
Originally Posted by OnePL View Post
half of the ball is in the ground, I would like that the whole model of the ball was on the ground
No shit -_-

Try: engfunc(EngFunc_SetSize, pilka, Float:{ -5.0, -5.0, -24.0 }, Float:{ 5.0, 5.0, 24.0 })
__________________
Retired.

Last edited by Xalus; 05-25-2014 at 14:15.
Xalus is offline
Reply


Thread Tools
Display Modes

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 09:46.


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