Raised This Month: $51 Target: $400
 12% 

Solved Sprite not showing & Sound not emitting


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 11-24-2018 , 13:58   Sprite not showing & Sound not emitting
Reply With Quote #1

I'm using this to show a sprite on a player's origin but nothing is showing
PHP Code:
InfectionSpriteiPlayer )

    new 
iSprite create_entity"env_sprite" );
    
    new 
Float:fOrigin];
    
peviPlayerpev_originfOrigin );
    
    
engfuncEngFunc_SetOriginiSpritefOrigin );
    
set_peviSpritepev_renderamt16 );
    
set_peviSpritepev_renderfxkRenderFxNone );
    
set_peviSpritepev_rendercolor2550);
    
set_peviSpritepev_framerate0.0 );
    
set_peviSpritepev_modelg_iConfigINFECTION_SPRITE ] );

And I'm using this to emit a sound but I don't hear anything.
PHP Code:
emit_soundidCHAN_VOICEg_iConfigINFECTION_SOUND ], 1.0ATTN_NORM0PITCH_NORM ); 
The file paths are correct too:
Code:
SvM/Infection_Sound.wav sprites/SvM/infection_sprite.spr

Sound is 8 bit, 22050 HZ and mono channel.
__________________

Last edited by edon1337; 11-25-2018 at 08:17.
edon1337 is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 11-24-2018 , 14:41   Re: Sprite not showing & Sound not emitting
Reply With Quote #2

Maybe its necessary to put any mins/maxs for the entity?
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
Old 11-25-2018, 07:37
edon1337
This message has been deleted by edon1337.
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 11-25-2018 , 08:04   Re: Sprite not showing & Sound not emitting
Reply With Quote #3

Quote:
Originally Posted by JocAnis View Post
Maybe its necessary to put any mins/maxs for the entity?
Yeah that was the issue but I figured it wasn't what I really needed and used TE_SPRITE, now it's okay.
Still trying to figure out what's causing the sound not to emit, I'll try adding 'sound' to the file path.

EDIT: Fixed both! Problem was at the file path.
__________________

Last edited by edon1337; 11-25-2018 at 08:17.
edon1337 is offline
Reply



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 07:44.


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