Raised This Month: $ Target: $400
 0% 

Get bomb origin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ezio_auditore
Senior Member
Join Date: May 2013
Old 05-06-2014 , 11:38   Get bomb origin
Reply With Quote #1

How can we get the origin of the bomb when it gets planted.
Can it be done by getting the planting player's origin? Would be better if someone will tell me
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 05-06-2014 , 11:44   Re: Get bomb origin
Reply With Quote #2

You should be able to find the bomb entity on the bomb_planted event from csx and then get its origin.

It won't be the same as planter's origin, because there will be some difference in the Z axis.

Last edited by Backstabnoob; 05-06-2014 at 11:44.
Backstabnoob is offline
ezio_auditore
Senior Member
Join Date: May 2013
Old 05-06-2014 , 11:47   Re: Get bomb origin
Reply With Quote #3

Oh is that it.
But can you post a code which hooks the bomb_planted event please
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 05-06-2014 , 11:51   Re: Get bomb origin
Reply With Quote #4

PHP Code:
#include < csx >

public bomb_plantedplanter )
{
    new 
iBomb
    
if ( ( iBomb fm_find_ent_by_model( -1"grenade""models/w_c4.mdl" ) ) )  
    {
        new 
FloatfVecOrigin]
        
peviBombpev_originfVecOrigin )
    }

It's a forward, it will get called automatically.
Backstabnoob is offline
ezio_auditore
Senior Member
Join Date: May 2013
Old 05-06-2014 , 11:55   Re: Get bomb origin
Reply With Quote #5

Quote:
Originally Posted by Backstabnoob View Post
PHP Code:
#include < csx >
 
public bomb_plantedplanter )
{
    new 
iBomb
    
if ( ( iBomb fm_find_ent_by_model( -1"grenade""models/w_c4.mdl" ) ) )  
    {
        new 
FloatfVecOrigin]
        
peviBombpev_originfVecOrigin )
    }

It's a forward, it will get called automatically.
Thanks a lot...
but I have a question.
will
Code:
fm_find_ent_by_model()
required fakemeta_util
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 05-06-2014 , 11:57   Re: Get bomb origin
Reply With Quote #6

Just copy it from fakemeta_util or look how it's done, I copy pasted it from ven's thread
Backstabnoob is offline
ezio_auditore
Senior Member
Join Date: May 2013
Old 05-06-2014 , 11:59   Re: Get bomb origin
Reply With Quote #7

Oh thats it...
Thanks by the way.
You did a great help bud
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
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 09:36.


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