AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   smoke can disappear (https://forums.alliedmods.net/showthread.php?t=112780)

whosyourdaddy 12-21-2009 04:28

smoke can disappear
 
ok so pretyt much im using this function to make a green smoke nade as a poison smoke but if u dont see it explode then the green smoke wont show but if u see it explode then it will show any idea why?

Code:

static Float:origin[3]
new szModel[ 64 ]
pev(entity, pev_origin, origin)
 
entity_get_string( entity, EV_SZ_model, szModel, charsmax( szModel ) );
/
/ remove entity from world
entity_set_vector( entity, EV_VEC_origin, Float:{ 9999.9, 9999.9, 9999.9 } );
entity_set_int( entity, EV_INT_flags, FL_KILLME );
 
static ent
ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
 
entity_set_string(ent, EV_SZ_classname, "poisen_nade")
 
set_pev(ent,pev_solid,SOLID_TRIGGER)
 
set_pev(ent, pev_owner, owner) // cvar amx_gasobeyFF
 
entity_set_origin(ent,origin)
entity_set_model( ent, szModel );
entity_set_size(ent, Float:{-180.0, -180.0, -180.0}, Float:{180.0, 180.0, 180.0})
 
message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
write_byte( TE_FIREFIELD );
engfunc( EngFunc_WriteCoord, origin[ 0 ] );
engfunc( EngFunc_WriteCoord, origin[ 1 ] );
engfunc( EngFunc_WriteCoord, origin[ 2 ] + 50 );
write_short( 100 );
write_short( g_iSprites[SPR_GREENSMOKE] );
write_byte( 100 );
write_byte( TEFIRE_FLAG_ALPHA );
write_byte( 1000 );
message_end();
 
 
message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
write_byte( TE_FIREFIELD );
engfunc( EngFunc_WriteCoord, origin[ 0 ] );
engfunc( EngFunc_WriteCoord, origin[ 1 ] );
engfunc( EngFunc_WriteCoord, origin[ 2 ] + 50 );
write_short( 150 );
write_short( g_iSprites[SPR_GREENSMOKE] );
write_byte( 10 );
write_byte( TEFIRE_FLAG_ALPHA | TEFIRE_FLAG_SOMEFLOAT );
write_byte( 1000 );
message_end( );



All times are GMT -4. The time now is 04:15.

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