Raised This Month: $ Target: $400
 0% 

1 Simple Question About TE_DLIGHT


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Merc3y
Member
Join Date: Dec 2009
Old 12-27-2009 , 13:29   1 Simple Question About TE_DLIGHT
Reply With Quote #1

Anyone know how to remove the TE_DLIGHT after a function is false or == 0 ?

Something like this:

PHP Code:
                static origin]
                
get_user_originidorigin )
                if ( 
HasASDid ] == )
                {
                        
message_beginMSG_PVSSVC_TEMPENTITYorigin )
                        
write_byteTE_DLIGHT )
                        
write_coordorigin] ) 
                        
write_coordorigin] )
                        
write_coordorigin] )
                        
write_byte10 )
                        
write_byte)
                        
write_byte)
                        
write_byte)
                        
write_byte)
                        
write_byte)
                        
message_end( )
                }
 
                static 
origin]
                
get_user_originidorigin )
                if ( 
HasMadnessid ] == )
                {
                        
message_beginMSG_PVSSVC_TEMPENTITYorigin )
                        
write_byteTE_DLIGHT )
                        
write_coordorigin] ) 
                        
write_coordorigin] )
                        
write_coordorigin] )
                        
write_byte10 )
                        
write_byte)
                        
write_byte)
                        
write_byte255 )
                        
write_byte)
                        
write_byte)
                        
message_end( )
                } 
I try to replace the TE_DLIGHT with 0 when the function is 1 it crash my server.
__________________
How I Wish That I Can Host Without Any Problem.

Last edited by Merc3y; 12-27-2009 at 13:31.
Merc3y is offline
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 12-27-2009 , 22:28   Re: 1 Simple Question About TE_DLIGHT
Reply With Quote #2

Aura? from mah witch ?
EDIT: Put in inside FM_PlayerPreThink
Code:
public fw_PlayerPreThink( id )
{
    if( !is_user_alive( id ) || !zp_get_user_zombie( id ) || zp_get_user_zombie_class( id ) != g_zclass_witch || zp_get_user_nemesis( id ) )
        return FMRES_IGNORED
    
    if( is_user_alive( id ) && zp_get_user_zombie( id ) && zp_get_user_zombie_class( id ) == g_zclass_witch && !zp_get_user_nemesis( id ) )
    {
        if( HasASD[ id ] == 1 )
        {
            static origin[ 3 ]
            get_user_origin( id, origin )
        
            message_begin( MSG_PVS, SVC_TEMPENTITY, origin )
            write_byte( TE_DLIGHT )
            write_coord( origin[0] ) 
            write_coord( origin[1] )
            write_coord( origin[2] )
            write_byte( 10 )
            write_byte( 180 )
            write_byte( 0 )
            write_byte( 0 )
            write_byte( 2 )
            write_byte( 0 )
            message_end( )
        }
    }
    return FMRES_IGNORED
}
You don't have to return 0... It will automatically check when it becomes 0. Look inside my witch code.

Last edited by Excalibur.007; 12-27-2009 at 22:34.
Excalibur.007 is offline
Merc3y
Member
Join Date: Dec 2009
Old 12-28-2009 , 01:19   Re: 1 Simple Question About TE_DLIGHT
Reply With Quote #3

Quote:
Originally Posted by Excalibur.007 View Post
Aura? from mah witch ?
EDIT: Put in inside FM_PlayerPreThink
Code:
public fw_PlayerPreThink( id )
{
    if( !is_user_alive( id ) || !zp_get_user_zombie( id ) || zp_get_user_zombie_class( id ) != g_zclass_witch || zp_get_user_nemesis( id ) )
        return FMRES_IGNORED
 
    if( is_user_alive( id ) && zp_get_user_zombie( id ) && zp_get_user_zombie_class( id ) == g_zclass_witch && !zp_get_user_nemesis( id ) )
    {
        if( HasASD[ id ] == 1 )
        {
            static origin[ 3 ]
            get_user_origin( id, origin )
 
            message_begin( MSG_PVS, SVC_TEMPENTITY, origin )
            write_byte( TE_DLIGHT )
            write_coord( origin[0] ) 
            write_coord( origin[1] )
            write_coord( origin[2] )
            write_byte( 10 )
            write_byte( 180 )
            write_byte( 0 )
            write_byte( 0 )
            write_byte( 2 )
            write_byte( 0 )
            message_end( )
        }
    }
    return FMRES_IGNORED
}
You don't have to return 0... It will automatically check when it becomes 0. Look inside my witch code.
I took it from zombieplague source code ?
__________________
How I Wish That I Can Host Without Any Problem.
Merc3y is offline
Reply


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 04:16.


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