AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   C4 mark through wall (https://forums.alliedmods.net/showthread.php?t=220405)

snack_koo 07-10-2013 10:09

C4 mark through wall
 
Hello everybody!

I try to show a sprite (C4MARK) at the top of head of player who hold the C4.

On Rounstart Event I check player has C4 and call the function
PHP Code:

public ShowC4Icon(id)
{
    
// Create entity at player's position
    
new Entity engfuncEngFunc_CreateNamedEntityengfuncEngFunc_AllocString"env_sprite"))    
    new 
Float:HeadOrigin[3], Float:HeadAngles[3];
    
engfunc(EngFunc_GetBonePositionid8,HeadOrigin,HeadAngles);    
    
// Set sprite on entity    
    
engfuncEngFunc_SetModelEntity,C4Sprite)
    
set_pev(Entitypev_scale0.5);
    
//set origin
    
HeadOrigin[2]+=25.0
    set_pev
(Entitypev_originHeadOrigin)    

    
set_pev(Entitypev_movetypeMOVETYPE_FOLLOW
    
set_pev(Entitypev_aimentid);
    
    
// Set proper rendering
    
set_pev(Entitypev_rendermodekRenderTransAdd)
    
set_pev(Entitypev_renderamt200.0)
    
    
dllfuncDLLFunc_Spawn,Entity)  
     


It worked but I have some problem
1. How do i make the sprite entity can be seen through the wall . I mean that i can not see the player hold c4 but i still see the c4sprite through wall

2. How do I make that only Terror can see the c4sprite

Anybody have any idea? Great thanks!

baneado 07-10-2013 16:44

Re: C4 mark through wall
 
for only see T team use forward addtofullpack

~Ice*shOt 07-11-2013 13:35

Re: C4 mark through wall
 
1. Take a look at this https://forums.alliedmods.net/showth...ght=supply+box


All times are GMT -4. The time now is 06:28.

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