| smiley92 |
12-16-2013 14:15 |
Cvars plugin
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_plugin( PLUGIN, VERSION, "Askhanar" ); register_event( "DeathMsg", "EventDeathMsg", "a" ); }
public plugin_precache( ) { real_snow = precache_model( snowflakes ); }
public EventDeathMsg( ) {
new iVictim = read_data( 2 ); new iKiller = read_data( 1 ); if( iVictim != iKiller ) {
new Float:fOrigin[ 3 ], iOrigin[ 3 ]; pev( iVictim, pev_origin, fOrigin ); FVecIVec( fOrigin, iOrigin ); UTIL_CreateSnow( iOrigin, real_snow, random_num( 40, 60 ), random_num( 10, 15 ), random_num( 5, 10 ) ); } }
stock UTIL_CreateSnow( const iOrigin[ 3 ], const iSpriteID, const iCount, const iLife, const iScale ) {
message_begin( MSG_BROADCAST,SVC_TEMPENTITY ); write_byte( TE_SPRITETRAIL ); write_coord( iOrigin[ 0 ] ); // start position (X) write_coord( iOrigin[ 1 ] ); // start position (Y) write_coord( iOrigin[ 2 ] ); // start position (Z) write_coord( iOrigin[ 0 ] ); // end position (X) write_coord( iOrigin[ 1 ] ); // end position (Y) write_coord( iOrigin[ 2 ] + random_num( 40, 60 ) ); // end position (Z) write_short( iSpriteID ); // sprite index write_byte( iCount ); // number of snow write_byte( iLife ); // life in 0.1's write_byte( iScale ); // scale in 0.1's write_byte( random_num( 40, 55 ) ); // velocity along vector in 10's write_byte( random_num( 15, 15 ) ); // randomness of velocity in 10' message_end( ); }
I have that plugin, and I want to somebody help me with some cvar, like at mean:
http://**************/photo/my-images/854/v6w7.jpg/
http://**************/photo/my-images/842/1bd4.jpg/
Can make somebody plugin like a pictures above, a cvar with fog ( darkness ), and another cvar with density of snow? ( smoothly, moderate and abundant ).
1. cvar 1 - activated, 0 - cvar off fog
2. 1 - cvar smoothly, 2 - cvar moderate, 3 - abundant.
|