Raised This Month: $51 Target: $400
 12% 

grenade throw area


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 03-07-2019 , 00:51   grenade throw area
Reply With Quote #1

hii ,

i need help , actually i wanted to make a grenade plugin which perform any particular function on any entity by finding class name if the enitity within the area of grenade damage like:

i have buyed a grenade i throw it on ground and the sentry gun (classname : sentry) is within the area of grenade damage and than i wanted to perform this function


I HAVE THE CODE FOR FUNCTION

if ID of grenade is "g_grenadeID"

PHP Code:
new ent
        
while((ent find_ent_by_class(ent,"sentry")) != 0){
            if(
get_sentry_team(ent) != fm_cs_get_user_teamg_HeroID )){
                new 
Float:entorigin[3],origin[3]
                
peventpev_originentorigin )
                
pevg_grenadeIDpev_originorigin )
                
                if(
UTIL_IsVisibleentg_grenadeID) && get_distance_f(origin entorigin )  <=  500.0)
                {
                    
set_anim(ent0)
                    
set_pev(entpev_euser31)
                    new 
Float:fAngle[3]
                    
entity_get_vector entEV_VEC_anglesfAngle )
                    
fAngle[0] = 200 * (180.0 3.141592654)
                    
entity_set_vector entEV_VEC_anglesfAngle )
                    
                    new 
Float:fOriginSentry[3]
                    
entity_get_vector entEV_VEC_originfOriginSentry )
                    new 
start_[3]
                    
FVecIVec(fOriginSentrystart_)
                    
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
                    
write_byte(TE_SPRITE)
                    
write_coord(start_[0])
                    
write_coord(start_[1])
                    
write_coord(start_[2] + 20)
                    
write_short(g_frostSpr/// sprite 
                    
write_byte(5
                    
write_byte(500)
                    
message_end()
                }else{
                    
set_pev(entpev_euser30)
                }    
            } 

MEANS i have the code of function to apply but i dont know how can i attach this with grenade


if you dont understand what i am talking about becuase my english is A0
than you can see this video , this plugin do same function

:VIDEO LINK TO UNDERSTAND



I AM NOT REQUESTING TO MAKE THIS PLUGIN , I AM JUST ASKING SOME GUIDELINES TO PERFORM THIS FUNCTION
SHIELD755 is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 03-07-2019 , 07:46   Re: grenade throw area
Reply With Quote #2

Perform this code on grenade explosion.
https://github.com/CSnajper/zm_exp_s..._fire.sma#L321
__________________









Last edited by CrazY.; 03-07-2019 at 07:47.
CrazY. is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 03-07-2019 , 08:29   Re: grenade throw area
Reply With Quote #3

Quote:
Originally Posted by CrazY. View Post
Perform this code on grenade explosion.
https://github.com/CSnajper/zm_exp_s..._fire.sma#L321
thanks a lot , i will test it
SHIELD755 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 16:44.


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