AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved Sprite not showing & Sound not emitting (https://forums.alliedmods.net/showthread.php?t=312279)

edon1337 11-24-2018 13:58

Sprite not showing & Sound not emitting
 
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.

JocAnis 11-24-2018 14:41

Re: Sprite not showing & Sound not emitting
 
Maybe its necessary to put any mins/maxs for the entity?

edon1337 11-25-2018 08:04

Re: Sprite not showing & Sound not emitting
 
Quote:

Originally Posted by JocAnis (Post 2625532)
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.


All times are GMT -4. The time now is 07:30.

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