Mensajes: 4,451
Temas: 45
Registro en: Jan 2014
Reputación:
24
12/12/2016, 10:44 AM
(Última modificación: 12/12/2016, 10:52 AM por FreDDy.)
(12/12/2016, 10:16 AM)smurfavr escribió: I do not understand how to do it.
Install the plugin, inside the map you write /getmenu and you get the origins of where you want the fireworks to come out then copies what will come out and paste it in the .ini.
example: de_dust2 origins.
[de_dust2]
-1807.375854, 2206.531250, 36.031250
-1635.235107, 1853.161376, 36.031250
-1576.815429, 2686.399169, 36.031250
-603.653442, 2321.659667, -89.799728
-395.735931, 1882.453857, -91.968750
1387.429809, 2176.344970, 36.031250
1171.636108, 2421.072265, 132.031250
Mensajes: 14
Temas: 0
Registro en: Dec 2016
Reputación:
0
Thank you all. I understand how it works.
Mensajes: 14
Temas: 0
Registro en: Dec 2016
Reputación:
0
12/12/2016, 09:18 PM
(Última modificación: 12/12/2016, 09:34 PM por smurfavr.)
Why the plugin does not work on MAP with long names? Those not working.
hlk_ultimate_crossfire
hlk_crossfire_edition1
xmas_fireworks.ini
[hlk_crossfire_edition1]
-511.765625, 941.032592, -1659.968750
-550.533569, 592.835144, -1659.968750
-191.392868, 52.485973, -1819.968750
-455.156433, -832.039916, -1659.968750
200.076919, -871.182067, -1659.968750
amx_plugins
Xmas Fireworks 1.0 Milashkasiya xmas_fireworks. stopped
Mensajes: 4,451
Temas: 45
Registro en: Jan 2014
Reputación:
24
(12/12/2016, 09:18 PM)smurfavr escribió: Why the plugin does not work on MAP with long names? Those not working.
hlk_ultimate_crossfire
hlk_crossfire_edition1
I dont know.
You can change the name of the map to a shorter one and try.
Mensajes: 14
Temas: 0
Registro en: Dec 2016
Reputación:
0
If you change the name of MAP players will give them the error and should again bring down the MAP.
This is a problem with the plugin can it be fixed?
Mensajes: 876
Temas: 74
Registro en: Sep 2015
Reputación:
11
Código PHP: #define VERSION "1.0"
#include <amxmodx> #include <engine>
// const const HUD_COLOR = 22 + ( 166 << 8 ) + ( 60 << 16 ) // B + ( G << 8 ) + ( R << 16 )
// resources new const mdl_rpgammo [ ] = "models/w_rpgammo.mdl" new const mdl_rpgrocket[ ] = "models/rpgrocket.mdl" new const s_weapondrop1[ ] = "items/weapondrop1.wav" new const s_rocket1 [ ] = "fireworks/rocket1.wav" new const spr_laserbeam[ ] = "sprites/laserbeam.spr" new const spr_flare6 [ ] = "sprites/flare6.spr" new const spr_lgtning [ ] = "sprites/lgtning.spr" new const spr_explode1 [ ] = "sprites/explode1.spr" new const spr_steam1 [ ] = "sprites/steam1.spr"
new const spr_flares[ ][ ] = { "sprites/fireworks/bflare.spr", "sprites/fireworks/rflare.spr", "sprites/fireworks/gflare.spr", "sprites/fireworks/tflare.spr", "sprites/fireworks/oflare.spr", "sprites/fireworks/pflare.spr", "sprites/fireworks/yflare.spr" }
// resources index new spr_laserbeam_id new spr_flare6_id new spr_lgtning_id new spr_explode1_id new spr_steam1_id new spr_flares_id[ sizeof spr_flares ]
// entity new const xmas_shooter [ ] = "xmas_shooter" // shooter classname new const xmas_fireworks[ ] = "xmas_fireworks" // firework classname new const Float:vecMins[ 3 ] = { -4.0, -4.0, -1.0 } new const Float:vecMaxs[ 3 ] = { 4.0 , 4.0 , 12.0 }
// arrays new Array:aOrigins
// cvars new cvar_enable new cvar_times new cvar_shots new cvar_lights
// global new g_originsnum new g_rocketsnum new g_showhudmsg
public plugin_precache( ) { precache_model( mdl_rpgammo ) precache_model( "models/w_rpgammot.mdl" ) precache_model( mdl_rpgrocket ) precache_sound( s_weapondrop1 ) precache_sound( s_rocket1 ) spr_laserbeam_id = precache_model( spr_laserbeam ) spr_flare6_id = precache_model( spr_flare6 ) spr_lgtning_id = precache_model( spr_lgtning ) spr_explode1_id = precache_model( spr_explode1 ) spr_steam1_id = precache_model( spr_steam1 ) for( new i; i < sizeof spr_flares; i++ ) { spr_flares_id[ i ] = precache_model( spr_flares[i] ) } }
public plugin_init( ) { // original plugin: https://forums.alliedmods.net/showthread.php?t=3638 register_plugin( "Xmas Fireworks", VERSION, "Milashkasiya" ) register_think( xmas_fireworks, "think_fireworks" ) register_touch( "*", xmas_fireworks, "touch_fireworks" ) cvar_enable = register_cvar( "xfireworks_enable", "1" ) cvar_times = register_cvar( "xfireworks_times", "2" ) cvar_shots = register_cvar( "xfireworks_shots", "8" ) cvar_lights = register_cvar( "xfireworks_lights", "1" ) load_origins( ) set_task( 0.8, "task_realtime" ) }
public task_realtime( ) { #define T_COMPENSATION 10.0 #define EF_DURATION 10.0 new Float:flTimeleft = float( get_timeleft() ) new Float:flTimes = get_pcvar_float( cvar_times ) new Float:flTimer if( !flTimeleft ) { flTimer = random_float( 600.0, 900.0 ) } else { flTimer = ( flTimeleft / flTimes ) - ( T_COMPENSATION / flTimes ) if( flTimer < EF_DURATION ) { flTimes = flTimeleft / EF_DURATION flTimer = ( flTimeleft / flTimes ) - ( T_COMPENSATION / flTimes ) } } set_task( flTimer, "task_prepare_shooter", _, _, _, "a", floatround(flTimes) ) }
public task_prepare_shooter( ) { if( !get_pcvar_num(cvar_enable) ) return create_shooter( ) }
create_shooter( ) { new entity new Float:vecOrigin[ 3 ] new shots = get_pcvar_num( cvar_shots ) g_rocketsnum = shots * g_originsnum g_showhudmsg = g_originsnum / 2 for( new i; i < g_originsnum; i++ ) { entity = create_entity( "info_target" ) assert entity entity_set_string( entity, EV_SZ_classname, xmas_shooter ) entity_set_model( entity, mdl_rpgammo ) entity_set_int( entity, EV_INT_movetype, MOVETYPE_TOSS ) entity_set_int( entity, EV_INT_iuser1, shots ) ArrayGetArray( aOrigins, i, vecOrigin ) entity_set_origin( entity, vecOrigin ) DispatchSpawn( entity ) emit_sound( entity, CHAN_WEAPON, s_weapondrop1, VOL_NORM, ATTN_NORM, 0, PITCH_NORM ) set_task( random_float(0.1, 1.5), "task_prepare_fireworks", entity, _:vecOrigin , 3, "a", shots ) } }
public task_prepare_fireworks( origin[3], shooter ) { create_fireworks( shooter, Float:origin ) new iShots = entity_get_int( shooter, EV_INT_iuser1 ) - 1 if( !iShots ) { remove_entity( shooter ) } else { entity_set_int( shooter, EV_INT_iuser1, iShots ) } }
create_fireworks( shooter, Float:origin[3] ) { new entity = create_entity( "info_target" ) assert entity entity_set_string( entity, EV_SZ_classname, xmas_fireworks ) entity_set_model( entity, mdl_rpgrocket ) entity_set_size( entity, vecMins, vecMaxs ) entity_set_int( entity, EV_INT_solid, SOLID_SLIDEBOX ) entity_set_int( entity, EV_INT_movetype, MOVETYPE_TOSS ) entity_set_float( entity, EV_FL_fuser1, get_gametime() + random_float(2.0, 4.0) + 0.1 ) entity_set_edict( entity, EV_ENT_owner, shooter ) entity_set_vector( entity, EV_VEC_angles, Float:{90.0, 0.0, 0.0} ) entity_set_origin( entity, origin ) DispatchSpawn( entity ) // beamfollow effect message_begin( MSG_BROADCAST, SVC_TEMPENTITY ) write_byte( TE_BEAMFOLLOW ) write_short( entity ) write_short( spr_laserbeam_id ) write_byte( 60 ) write_byte( 4 ) write_byte( random(256) ) write_byte( random(256) ) write_byte( random(256) ) write_byte( random_num(200, 255) ) message_end( ) emit_sound( entity, CHAN_WEAPON, s_rocket1, VOL_NORM, ATTN_NORM, 0, PITCH_NORM ) entity_set_float( entity, EV_FL_nextthink, get_gametime() + 0.1 ) }
public think_fireworks( const entity ) { static Float:flGametime flGametime = get_gametime( ) if( entity_get_float(entity, EV_FL_fuser1) <= flGametime ) { explode_rocket( entity ) } else { static Float:vecVelocity[ 3 ] vecVelocity[ 0 ] = random_float( -100.0, 100.0 ) vecVelocity[ 1 ] = random_float( -100.0, 100.0 ) vecVelocity[ 2 ] = random_float( 800.0, 1800.0 ) entity_set_vector( entity, EV_VEC_velocity, vecVelocity ) entity_set_float( entity, EV_FL_nextthink, flGametime + random_float( 0.1, 1.5) ) } }
public touch_fireworks( const touched, const toucher ) { explode_rocket( toucher ) }
explode_rocket( const rocket ) { new output[ 64 ] if( get_pcvar_num(cvar_lights) ) { if( --g_rocketsnum > 0 ) { formatex( output, charsmax(output), "%c", random_num('d','z') ) } else { formatex( output, charsmax(output), "#OFF" ) } set_lights( output ) } if( g_rocketsnum <= g_showhudmsg ) { new len = formatex( output, charsmax(output), "FELIZ NAVIDAD Y PROSPERO AÑO NUEVO :)" ) + 31 __show__dhudmessage( output, len, _:-1.0, _:0.28 ) } new Float:vecOrigin[ 3 ] entity_get_vector( rocket, EV_VEC_origin, vecOrigin )
////////////////////////////////////////////// message_begin_f( MSG_PVS, SVC_TEMPENTITY, vecOrigin ) write_byte( TE_BEAMDISK ) write_coord_f( vecOrigin[0] ) write_coord_f( vecOrigin[1] ) write_coord_f( vecOrigin[2] ) write_coord( 0 ) write_coord( 0 ) write_coord( 100 ) write_short( random(2) ? spr_flare6_id : spr_lgtning_id ) write_byte( 100 ) write_byte( 0 ) write_byte( 35 ) // life write_byte( 0 ) // line width write_byte( 150 ) // noise write_byte( random(256) ) write_byte( random(256) ) write_byte( random(256) ) write_byte( 255 ) write_byte( 5 ) message_end( )
////////////////////////////////////////////// message_begin( MSG_BROADCAST, SVC_TEMPENTITY ) write_byte( TE_SPRITETRAIL ) write_coord_f( vecOrigin[0] ) write_coord_f( vecOrigin[1] ) write_coord_f( vecOrigin[2] - 20 ) write_coord_f( vecOrigin[0] ) write_coord_f( vecOrigin[1] ) write_coord_f( vecOrigin[2] + 20 ) write_short( spr_flares_id[ random(sizeof spr_flares) ] ) write_byte( random_num(50, 100) ) // count write_byte( 10 ) // life in 0.1's write_byte( 10 ) // scale in 0.1's write_byte( random_num(40, 100) ) // velocity along vector in 10's write_byte( 60 ) // randomness of velocity in 10's message_end( ) ////////////////////////////////////////////// message_begin_f( MSG_PAS, SVC_TEMPENTITY, vecOrigin ) write_byte( TE_EXPLOSION ) write_coord_f( vecOrigin[0] ) write_coord_f( vecOrigin[1] ) write_coord_f( vecOrigin[2] ) write_short( spr_explode1_id ) write_byte( random_num(10, 20) ) // byte (scale in 0.1's) 188 write_byte( 10 ) // byte (framerate) write_byte( 0 ) // byte flags message_end( ) ////////////////////////////////////////////// message_begin_f( MSG_PAS, SVC_TEMPENTITY, vecOrigin ) write_byte( TE_TAREXPLOSION ) write_coord_f( vecOrigin[0] ) write_coord_f( vecOrigin[1] ) write_coord_f( vecOrigin[2] - 40.0 ) message_end( ) ////////////////////////////////////////////// message_begin_f( MSG_PVS, SVC_TEMPENTITY, vecOrigin ) write_byte( TE_SMOKE ) write_coord_f( vecOrigin[0] ) write_coord_f( vecOrigin[1] ) write_coord_f( vecOrigin[2] ) write_short( spr_steam1_id ) write_byte( random_num(20, 40) ) write_byte( 12 ) message_end( ) ////////////////////////////////////////////// message_begin_f( MSG_PVS, SVC_TEMPENTITY, vecOrigin ) write_byte( TE_DLIGHT ) write_coord_f( vecOrigin[0] ) write_coord_f( vecOrigin[1] ) write_coord_f( vecOrigin[2] ) write_byte( random_num(20, 50) ) write_byte( random(256) ) write_byte( random(256) ) write_byte( random(256) ) write_byte( 100 ) write_byte( 15 ) message_end( ) remove_entity( rocket ) }
// http://forums.alliedmods.net/showthread.php?t=149210 __show__dhudmessage( const szMessage[], iLen, x, y ) { message_begin( MSG_BROADCAST , SVC_DIRECTOR ) write_byte( iLen ) write_byte( DRC_CMD_MESSAGE ) write_byte( 0 ) // effect write_long( HUD_COLOR ) write_long( x ) write_long( y ) write_long( 0x3F800000 ) // fadeintime write_long( 0x3F800000 ) // fadeouttime write_long( 0x40A00000 ) // holdtime write_long( 0 ) // fxtime write_string( szMessage ) message_end( ) }
load_origins( ) { new output[ 128 ] get_localinfo( "amxx_configsdir", output, charsmax(output) ) add( output, charsmax(output), "/xmas_fireworks.ini" ) if( !file_exists(output) ) { set_fail_state( "xmas_fireworks.ini doesn't exist" ) return } aOrigins = ArrayCreate( 3 ) new map[ 35 ] new len = get_mapname( map, charsmax(map) ) new bool:match new origin[ 3 ][ 35 ] new Float:vecOrigin[ 3 ] new file = fopen( output, "rt" ) while( !feof(file) ) { fgets( file, output, charsmax(output) ) trim( output ) if( !output[0] || output[0] == ';' ) continue if( !match ) { if( output[0] == '[' && equal(output[1], map, len) && output[len + 1] == ']' ) { match = true } } else { if( output[0] == '[' ) break if( parse(output, origin[0], charsmax(origin[]), origin[1], charsmax(origin[]), origin[2], charsmax(origin[])) < 3 ) continue vecOrigin[ 0 ] = str_to_float( origin[0] ) vecOrigin[ 1 ] = str_to_float( origin[1] ) vecOrigin[ 2 ] = str_to_float( origin[2] ) ArrayPushArray( aOrigins, vecOrigin ) g_originsnum++ } } fclose( file ) if( !g_originsnum ) { log_amx( "%s doesn't exist in the xmas_fireworks.ini file", map ) pause( "ad" ) } }
Try with this.
Mensajes: 14
Temas: 0
Registro en: Dec 2016
Reputación:
0
12/12/2016, 09:57 PM
(Última modificación: 12/12/2016, 10:04 PM por smurfavr.)
Error
[ 24] unknown unknown unknown xmas_fireworks. bad load
( 24) Load fails: Plugin uses an unknown function (name "write_coord_f") - check your modules.ini.
Mensajes: 2,094
Temas: 59
Registro en: Feb 2015
Reputación:
15
(12/12/2016, 09:57 PM)smurfavr escribió: Error
[ 24] unknown unknown unknown xmas_fireworks. bad load
( 24) Load fails: Plugin uses an unknown function (name "write_coord_f") - check your modules.ini.
https://amxmodx-es.com/Thread-Xmas-Firew...7#pid49507
(18/11/2014, 05:47 PM)Neeeeeeeeeel.- escribió: Por qué necesitan una guía para todo? Meté mano y que salga lo que salga... es la mejor forma de aprender.
(16/05/2016, 11:08 PM)kikizon2 escribió: No cabe duda que tienen mierda en vez de cerebro, par de pendejos v:
Mensajes: 14
Temas: 0
Registro en: Dec 2016
Reputación:
0
13/12/2016, 06:41 AM
(Última modificación: 13/12/2016, 06:42 AM por smurfavr.)
OsweRRR
I'm using this version, but have a problem with it.
https://amxmodx-es.com/Thread-Xmas-Firew...#pid148163
Mensajes: 4,451
Temas: 45
Registro en: Jan 2014
Reputación:
24
(13/12/2016, 06:41 AM)smurfavr escribió: OsweRRR
I'm using this version, but have a problem with it.
https://amxmodx-es.com/Thread-Xmas-Firew...#pid148163
Just change the name of the map to a shorter and ready one. No errors and only have to download the map again.
Mensajes: 14
Temas: 0
Registro en: Dec 2016
Reputación:
0
The problem comes from the plugin. I asked Lev(author of dproto.) and he told me how to fix the problem.
Lev escribió:Change
Código: new map[ 16 ]
new len = get_mapname( map, charsmax(map) )
into
Código: new map[ 64 ]
new len = get_mapname( map, charsmax(map) )
Mensajes: 28
Temas: 8
Registro en: Sep 2017
Reputación:
0
Oigan pero en que parte del sma puedo editarlo para que los cohetes no exploten tan arriba por que de verdad es molesto ya que hay mapas que el cielo es muy bajo como ya explicaron allá arriba, de_dust2, es uno de tantos mapas, entonces mi pregunta en si es... abra forma de que los cohetes no exploten tan arriba? si se pudiera bajar seria exelente
Mensajes: 28
Temas: 16
Registro en: Mar 2017
Reputación:
0
31/12/2018, 07:00 AM
(Última modificación: 31/12/2018, 07:25 AM por Hunter2017. Edited 1 time in total.)
[de_dust2]
-615.102111, 2368.267578, -83.991500
-1633.607055, 2061.891845, 36.031250
1070.965576, 2588.162841, 132.031250
1505.086791, 1741.692260, 36.031250
1085.048828, 929.781799, 36.031250
463.504272, -18.031536, 36.031250
-1160.620239, -774.261840, 164.031250
-1672.725830, 192.770233, 36.031250
-302.410552, 559.187927, 36.031250
Anyone have this better? The Rockets are to high and dont explode there.
see here https://www.youtube.com/watch?v=ZNqxdslB...e=youtu.be
|