Raised This Month: $ Target: $400
 0% 

ambient_generic


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Dr.G
Senior Member
Join Date: Nov 2008
Old 01-20-2009 , 09:49   ambient_generic
Reply With Quote #1

Ive tryed to create an ent. to play a sound like this:

PHP Code:
new ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))
 
 if(!
ent)
  return 
PLUGIN_HANDLED 
 set_pev
(entpev_classname"ambient_generic")
 
set_pev(entpev_targetname"fly_by")
 
dllfunc(DLLFunc_Spawnent)
 
 
set_pev(ent,pev_message,"ambience/fd_flyby1.wav")
 
 
set_keyvalue(ent,"pitchstart","100")
 
set_keyvalue(ent,"pitch","100")
 
set_keyvalue(ent,"health","10")
 
set_pev(ent,pev_spawnflags,"8")
 
 
 new 
Float:origin[3
 
origin[0] = 275.0
 origin
[1] = 380.0
 origin
[2] = 500.0 
 set_pev
(entpev_originorigin
And this:

PHP Code:
new ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"ambient_generic"))
 
 if(!
ent)
  return 
PLUGIN_HANDLED 
 
 set_pev
(entpev_targetname"fly_by")
 
dllfunc(DLLFunc_Spawnent)
 
 
set_pev(ent,pev_message,"ambience/fd_flyby1.wav")
 
 
set_keyvalue(ent,"pitchstart","100")
 
set_keyvalue(ent,"pitch","100")
 
set_keyvalue(ent,"health","10")
 
set_pev(ent,pev_spawnflags,"8")
 
 
 new 
Float:origin[3
 
origin[0] = 275.0
 origin
[1] = 380.0
 origin
[2] = 500.0 
 set_pev
(entpev_originorigin
And ive tryed some diffrent spawn flags but it wont work.. any idea that iam doing wrong here?

Oh and btw i trig it like this

PHP Code:
new ent engfunc(EngFunc_FindEntityByString,-1,"targetname","fly_by")
 
 if(
ent)
  
dllfunc(DLLFunc_Use,ent,id
Thanks in advance....
__________________
Dr.G is offline
 



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 01:42.


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