Raised This Month: $ Target: $400
 0% 

Blocking TE_BEAMFOLLOW


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 04-17-2013 , 14:01   Re: Blocking TE_BEAMFOLLOW
Reply With Quote #1

Go on please? Can you be a bit more precise?
mottzi is offline
Send a message via MSN to mottzi
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-17-2013 , 14:50   Re: Blocking TE_BEAMFOLLOW
Reply With Quote #2

Try this :

PHP Code:
new bool:g_bSeeTrails[33]
new 
bool:g_bHasTrail[33]

public 
plugin_init()
{
    
register_clcmd("say /seetrail""ClCmd_ToggleTrails")
}

public 
ClCmd_ToggleTrailsid )
{
    new 
players[32], numplayer
    get_players
(playersnum"a")
    if( (
g_bSeeTrails[id] = !g_bSeeTrails[id]) )
    {
        for(--
numnum>=0num--)
        {
            
player players[num]
            if( 
g_bHasTrail[player] )
            {
                
Util_TE_BEAMFOLLOW(idplayergl_sprite20525500100)
            }
        }
    }
    else
    {
        for(--
numnum>=0num--)
        {
            
player players[num]
            if( 
g_bHasTrail[player] )
            {
                
Util_TE_KILLBEAM(idplayer)
            }
        }
    }
}

set_trail(idbool:bTrailStatus)
{
    if( 
bTrailStatus == g_bHasTrail[id] )
    {
        return 
0
    
}

    
g_bHasTrail[id] = bTrailStatus

    
new players[32], numplayer
    get_players
(playersnum"ch")
    for(--
numnum>=0num--)
    {
        
player players[i]
        if( 
g_bSeeTrails[player] )
        {
            if( 
bTrailStatus )
            {
                
Util_TE_BEAMFOLLOW(playeridgl_sprite20525500100)
            }
            else
            {
                
Util_TE_KILLBEAM(playerid)
            }
        }
    }
}

Util_TE_BEAMFOLLOW(identityspritelifewidthredgreenbluebrightness)
{
    
message_begin(id MSG_ONE MSG_ALLSVC_TEMPENTITY_id);
    
write_byte(TE_BEAMFOLLOW);
    
write_short(entity);
    
write_short(sprite);
    
write_byte(life); // life in 0.1's
    
write_byte(width); // line width in 0.1's
    
write_byte(red);
    
write_byte(green);
    
write_byte(blue);
    
write_byte(brightness);
    
message_end();
}

Util_TE_KILLBEAM(identity)
{
    
message_begin(id MSG_ONE MSG_ALLSVC_TEMPENTITY_id);
    
write_byte(TE_KILLBEAM);
    
write_short(entity);
    
message_end();

__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 10:49.


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