AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   plugin snow (https://forums.alliedmods.net/showthread.php?t=231389)

smiley92 12-13-2013 13:48

plugin snow
 
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?

mottzi 12-13-2013 16:01

Re: plugin snow
 
What dou you mean with "postion is not good"? Explain a little bether please.

smiley92 12-14-2013 06:07

Re: plugin snow
 
Sprite with snow, don`t work good because positions of write_byte is not for that plugin.Now, I have that plugin, and origins is for another plugins, and don`t function properly, is snowing laterally.


All times are GMT -4. The time now is 20:24.

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