Raised This Month: $ Target: $400
 0% 

Problem with pev_view_ofs


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 02-10-2010 , 06:23   Re: Problem with pev_view_ofs
Reply With Quote #5

Silly coded...

PHP Code:

new const gwatterBallClassname[] = "watterball";
new 
gLaserSprite;
#define write_coord_f(%0)  ( engfunc( EngFunc_WriteCoord, %0 ) )

public ClientCommand_Createwatter ( const Player, const Level, const Cid )
{
    if ( !
cmd_accessPlayerLevelCid) )
    {
        return 
PLUGIN_HANDLED;
    }
    
    new 
Float:Origin[3];
    new 
Entity;
    
    
pevPlayerpev_originOrigin );
    
    if ( ( 
Entity create_entity"info_target" ) ) )
    {
        
set_pevEntitypev_classnamegwatterBallClassname );
        
        
        
engfuncEngFunc_SetSize  EntityFloat:{ -311.0, -1.0, -1.0 }, Float:{ 311.01.01.0 } );
        
engfuncEngFunc_SetOriginEntityOrigin );
        
        
set_pevEntitypev_effectsEF_BRIGHTFIELD );
        
set_pevEntitypev_solidSOLID_BBOX );
        
set_pevEntitypev_movetypeMOVETYPE_TOSS );
        
set_pevEntitypev_ownerPlayer );
        
set_pevEntitypev_nextthinkget_gametime() + 0.1 );
    }
    
    return 
PLUGIN_HANDLED_MAIN;
}
public 
ClientCommand_Killwatter ( const Player, const Level, const Cid )
{
    if ( 
cmd_accessPlayerLevelCid) )
    {
        
remove_entity_namegwatterBallClassname );
        return 
PLUGIN_HANDLED_MAIN;
    }
    
    return 
PLUGIN_HANDLED;
}
public 
CwatterBall_Think ( const Entity )
{
    if ( !
is_valid_entEntity ) )
    {
        return;
    }
    static 
Float:Origin[3];
    static 
Float:TestEnd[3];
    static 
Float:EndPos[3];
    
    
pevEntitypev_originOrigin );
    
    
TestEnd[0] = random_float( -5000.05000.0 );
    
TestEnd[1] = random_float( -5000.05000.0 );
    
TestEnd[2] = random_float0.05000.0 );
    
    
trace_lineEntityOriginTestEndEndPos );
    
    
message_beginMSG_BROADCASTSVC_TEMPENTITY );
    
write_byteTE_BEAMCYLINDER  )
    
write_coord_fOrigin[0] );
    
write_coord_fOrigin[1]  );
    
write_coord_fOrigin[2] + 200.0 );
    
write_coord_fEndPos[0] );
    
write_coord_fEndPos[1] );
    
write_coord_fEndPos[2] );
    
write_shortgLaserSprite );
    
write_byte255 );    //Start frame 0 
    
write_byte255 );    //Frame rate 0
    
write_byte20 );    //Life 10
    
write_byte10);    //Width 20
    
write_byte255);    //noise 300
    
write_byterandom_num(1,255) );    //R
    
write_byterandom_num(1,255)  );    //G
    
write_byterandom_num(1,255)  );    //B
    
write_byte255 );    //brightness 200
    
write_byte);    //Scroll 30
    
message_end();        //End
    
    
    
set_pevEntitypev_nextthinkget_gametime() + 0.25 );

Dont lol @ code please
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
 



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 07:19.


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