Raised This Month: $ Target: $400
 0% 

plugin snow


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
smiley92
Senior Member
Join Date: Jun 2011
Location: Romania
Old 12-13-2013 , 13:48   plugin snow
Reply With Quote #1

PHP Code:
#include < amxmodx >
#include <fakemeta>

#pragma semicolon 1
    
#define PLUGIN "Flares"
#define VERSION "0.0.1"

new const snowflakes[  ] = "sprites/snowflakes.spr";

new 
real_snow;
public 
plugin_init( ) {

    
register_pluginPLUGINVERSION"Askhanar" );
    
    
register_event"DeathMsg",  "EventDeathMsg",  "a" );
}

public 
plugin_precache(  ) {
    
real_snow precache_modelsnowflakes );
}


public 
EventDeathMsg(  ) {    

    new 
iVictim  read_data);
    new 
iKiller  read_data(  1  );
    
    if( 
iVictim  !=  iKiller ) {

        new 
Float:fOrigin], iOrigin];
        
peviVictimpev_originfOrigin );
        
FVecIVecfOriginiOrigin );
        
        
UTIL_CreateSnowiOriginreal_snowrandom_num4060 ), random_num1015 ), random_num510 ) );
    }
}



stock UTIL_CreateSnow( const iOrigin], const iSpriteID, const iCount, const iLife, const iScale ) {

    
message_beginMSG_BROADCAST,SVC_TEMPENTITY );
    
write_byteTE_SPRITETRAIL );
    
write_coordiOrigin] );                // start position (X)
    
write_coordiOrigin] );                // start position (Y)
    
write_coordiOrigin] );                // start position (Z)
    
write_coordiOrigin] );                // end position (X)
    
write_coordiOrigin] );                // end position (Y)
    
write_coordiOrigin] + random_num4060 ) );    // end position (Z)
    
write_shortiSpriteID );                // sprite index
    
write_byteiCount );                // number of snow
    
write_byteiLife );                    // life in 0.1's
    
write_byteiScale );                // scale in 0.1's
    
write_byterandom_num4055 ) );            // velocity along vector in 10's
    
write_byterandom_num1515 ) );            // randomness of velocity in 10'
    
message_end(  );

I have that plugin and not work properly.Coordonates position is not good.Can help make somebody to snow with that plugin better?
smiley92 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 20:24.


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