AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   bullet tracer (https://forums.alliedmods.net/showthread.php?t=221650)

RuRuRu612754 07-24-2013 19:18

bullet tracer
 
i want bullet tracer
i made it by referring to the other plugin
however there is a place that does not work and a lot of trouble

sample video:
http://www.youtube.com/watch?v=JeJ0d...ature=youtu.be

tracer is also make when you draw the weapon

PHP Code:

public plugin_init()
{
    ~
    ~
    ~
    
register_event("CurWeapon","checkWeapon","be","1=1")
    
register_event("CurWeapon""make_tracer""be""1=1""3>0")
}

~
~
~

public 
make_tracer(id)
{
    if(
get_pcvar_num(bullet_tracer))
    {
        new 
clipammo
        
new weaponid get_user_weapon(id,clip,ammo)

        if((
bullets[id] > clip) && (weaponid == CSW_AWP))
        {
            new 
origin1[3], origin2[3]
            
get_user_origin(idorigin11)
            
get_user_origin(idorigin24)
            
            
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
            
write_byte (0)
            
write_coord(origin1[0])
            
write_coord(origin1[1])
            
write_coord(origin1[2])
            
write_coord(origin2[0])
            
write_coord(origin2[1])
            
write_coord(origin2[2])
            
write_short(m_spriteTexture)
            
write_byte(1)
            
write_byte(5)
            
write_byte(15)
            
write_byte(15)
            
write_byte(0)
            
write_byte(255)
            
write_byte(0)
            
write_byte(0)
            
write_byte(155)
            
write_byte(150)
            
message_end()
        }
        
bullets[id] = clip
    
}


i should how to fix it?

thanks.

Arkshine 07-25-2013 05:30

Re: bullet tracer
 
Why you don't use the existing plugin (made by connor) ?

RuRuRu612754 07-25-2013 06:28

Re: bullet tracer
 
Quote:

Originally Posted by Arkshine (Post 1998295)
Why you don't use the existing plugin (made by connor) ?

thanks for your replay.
because i want to use as an item of this "ZP Extra Item"

Arkshine 07-25-2013 07:27

Re: bullet tracer
 
Modify his plugin then.

RuRuRu612754 07-25-2013 07:56

Re: bullet tracer
 
Quote:

Originally Posted by Arkshine (Post 1998349)
Modify his plugin then.

incorporate "ZP Extra" his plugin?

Arkshine 07-25-2013 08:39

Re: bullet tracer
 
You're trying to make a tracer plugin as ZP item. I'm telling you to use as base the connor's plugin instead of your code.


All times are GMT -4. The time now is 06:22.

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