Raised This Month: $ Target: $400
 0% 

Thunder lenght


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 03-12-2017 , 15:17   Thunder lenght
Reply With Quote #1

I'm trying to create a thunder between attacker and his enemy. Thats the code i'm using:

PHP Code:

new const gBeamSprite[] = "sprites/lgtning.spr"
new gBoltSprite 
PHP Code:
public plugin_precache()
{
    
gBoltSprite precache_model(gBeamSprite)

PHP Code:
new iTargetiBody
get_user_aiming
(idiTargetiBody170)

if(
pev_valid(iTarget))
{
    new 
iOrigin[3], iTargetOrigin[3]
    
get_user_origin(idiOrigin0)
    
get_user_origin(iTargetiTargetOrigin0)

    
CreateThunder(iOriginiTargetOrigin)

PHP Code:
CreateThunder(iStart[3], iEnd[3])
{
    
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
    
write_byte(TE_BEAMPOINTS)
    
write_coord(iStart[0]) 
    
write_coord(iStart[1])
    
write_coord(iStart[2])
    
write_coord(iEnd[0]) 
    
write_coord(iEnd[1]) 
    
write_coord(iEnd[2]) 
    
write_short(gBoltSprite
    
write_byte(1)
    
write_byte(1)
    
write_byte(4)
    
write_byte(30)
    
write_byte(30)
    
write_byte(120
    
write_byte(40)
    
write_byte(255)
    
write_byte(255)
    
write_byte(25)
    
message_end()

The problem is: When I miss the shot the thunder doesn't appear, cause the pev_valid. I want to know if is possible to show the thunder even if I miss with X lenght.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 03-12-2017 at 15:26.
EFFx is offline
 


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 17:48.


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