Raised This Month: $ Target: $400
 0% 

MOVETYPE_TOSS and touch event


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Perrytutoriales
Member
Join Date: Mar 2014
Old 01-11-2016 , 14:51   Re: MOVETYPE_TOSS and touch event
Reply With Quote #2

Use a Radius, Use this function and modify, put in to the register touch public

PHP Code:

#define RADIUS    500.0  // a Radius of 500 Unitys Half life Medition

#define is_player(%0)    (1 <= %0 <= g_iMaxplayers) 

new g_iMaxplayers 
new g_MsgScreenFade

public plugin_init()
{    
        
register_plugin("Vomit""1.0""Autor");
        
g_iMaxplayers get_maxplayers() 
        
g_MsgScreenFade get_user_msgid("ScreenFade")
}
public 
ShitThisVomit(Client

    if( 
is_user_alive(Client) ) 
    { 
        new 
iEnt;
        new 
Float:flOrigin[3];
        
pev(Clientpev_originflOrigin); // use the Entity origin, not the User change this lines

        
while( (iEnt engfunc(EngFunc_FindEntityInSphereiEntflOriginRADIUS)) ) 
        { 
            if( 
is_player(iEnt) && iEnt != Client 
            { 
                  
message_begin(MSG_ONE_UNRELIABLEg_MsgScreenFade_iEnt)
                  
write_short(40); // Modifique the Flash duration
                  
write_short(60);
                  
write_short(0x0000); //Type of ScreenFade Search the others
                  
write_byte(255); //R
                  
write_byte(255); //G
                  
write_byte(255); //B
                  
write_byte(255); //Brightness
                  
message_end();
            }  
        } 
    } 
    return 
PLUGIN_HANDLED 


Last edited by Perrytutoriales; 01-11-2016 at 14:53.
Perrytutoriales is offline
 



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 09:29.


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