Raised This Month: $153 Target: $400
 38% 

Plugin for snow


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
P.Marian
Junior Member
Join Date: Dec 2013
Location: Romania, Bucuresti
Old 12-23-2013 , 05:44   Plugin for snow
Reply With Quote #1

Who is this plugin for Snow?

P.Marian is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 12-23-2013 , 05:46   Re: Plugin for snow
Reply With Quote #2

There are already multiple threads about this plugin, search for them.
__________________
Kia is offline
preetham
Member
Join Date: Sep 2012
Location: India
Old 12-23-2013 , 05:51   Re: Plugin for snow
Reply With Quote #3

Here u go!

Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>

#define PLUGIN "Realistic Snow Fall" 
#define VERSION "0.1" 
#define AUTHOR "KillaH"

new const sprite[] = "sprites/fsnow/snow1.spr"
new cvar
new r, g, b
public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_touch("fsnow","*","remove")
    set_task(0.1, "prepare", _, _, _, "b")
    set_task(10.0, "remove", _, _, _, "b")
    cvar = register_cvar("number_flakes", "64")
    r = register_cvar("R", "255")
    g = register_cvar("G", "255")
    b = register_cvar("B", "255")
    
}
public plugin_precache()
{
    precache_model(sprite)
}
public prepare(id)
{
    new Float:origin[3]
    new map[64]
    get_mapname(map,63)
    if(equal(map,"cs_assault"))
        origin[2] = 999.0
    else if(equal(map,"de_dust2"))
        origin[2] = 250.0
    else if(equal(map, "de_nuke"))
        origin[2] = 120.0
    else if(equal(map, "de_inferno"))
        origin[2] = 430.0
    else if(equal(map, "de_dust")) 
        origin[2] = 210.0
    else
        return
    
    for(new i;i<get_pcvar_num(cvar);i++)
    {
        origin[0] = random_float(-2999.9,2999.9)
        origin[1] = random_float(-2999.9,2999.9)
        new ent = create_entity("env_sprite")
        static Float:color[3]
        color[0] = get_pcvar_float(r)
        color[1] = get_pcvar_float(g)
        color[2] = get_pcvar_float(b)
        entity_set_string(ent, EV_SZ_classname, "fsnow")
        entity_set_model(ent,sprite)
        entity_set_int(ent, EV_INT_spawnflags, SF_SPRITE_STARTON)
        entity_set_float(ent, EV_FL_framerate, 30.0)
        entity_set_float(ent, EV_FL_scale, 1.0)
        entity_set_int(ent, EV_INT_rendermode, kRenderTransAdd)
        entity_set_float(ent, EV_FL_renderamt, 255.0)
    
        
        set_pev(ent, pev_rendercolor, color)
        entity_set_origin(ent, origin)
        entity_set_int(ent, EV_INT_solid, SOLID_BBOX)
        entity_set_int(ent, EV_INT_movetype, MOVETYPE_TOSS)
        entity_set_size(ent,Float:{1.0,1.0,1.0},Float:{1.0,1.0,1.0})        
        entity_set_float(ent, EV_FL_gravity,0.4)
        new Float:v[3]
        entity_get_vector(ent,EV_VEC_velocity,v)
        v[0]=random_float(-250.0,250.0)
        v[1]=random_float(-250.0,250.0)
        entity_set_vector(ent,EV_VEC_velocity,v)
        
    }
}

public remove(ent) {
    remove_entity(ent)
}
an u need a snow sprite.. paste in sprited>fsnow>**paste .spr file here**
Attached Files
File Type: zip snow1.zip (6.2 KB, 144 views)
preetham is offline
P.Marian
Junior Member
Join Date: Dec 2013
Location: Romania, Bucuresti
Old 12-23-2013 , 05:51   Re: Plugin for snow
Reply With Quote #4

Neither is good.

Edit later: preetham, We'll try

Last edited by P.Marian; 12-23-2013 at 05:52.
P.Marian is offline
preetham
Member
Join Date: Sep 2012
Location: India
Old 12-23-2013 , 05:54   Re: Plugin for snow
Reply With Quote #5

Quote:
Originally Posted by P.Marian View Post
Neither is good.

Edit later: preetham, We'll try
Marian, code which gave u is the exact code of the plugin in ur picture..
preetham is offline
P.Marian
Junior Member
Join Date: Dec 2013
Location: Romania, Bucuresti
Old 12-24-2013 , 04:12   Re: Plugin for snow
Reply With Quote #6

Thank you very very much
P.Marian is offline
Reply


Thread Tools
Display Modes

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 10:24.


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