AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   to remove Fire in the hole (https://forums.alliedmods.net/showthread.php?t=324478)

jonny1990 05-17-2020 07:00

to remove Fire in the hole
 
PHP Code:

public plugin_init() {
    
register_plugin("are you trying to get free?""why?""you're going to die anyway");
    
// RG_CBasePlayer_ThrowGrenade?! NO)))
    
RegisterHookChain(RG_ThrowFlashbang"refwd_ThrowFlashbang_Post", .post true);
    
RegisterHookChain(RG_ThrowHeGrenade"refwd_ThrowHeGrenade_Post", .post true);
    
RegisterHookChain(RG_ThrowSmokeGrenade"refwd_ThrowSmokeGrenade_Post", .post true);
}

public 
refwd_ThrowFlashbang_Post(pPlayerFloat:vecSrc[3], Float:vecVelocity[3], Float:fTime) {
    
func_PlaySound(pPlayerg_szFlashSounds[random(g_iMaxSndFlash)]);
}

public 
refwd_ThrowHeGrenade_Post(pPlayerFloat:vecSrc[3], Float:vecVelocity[3], Float:fTimeteamusEvent) {
    
func_PlaySound(pPlayerg_szHegrenSounds[random(g_iMaxSndHe)]);
}

public 
refwd_ThrowSmokeGrenade_Post(pPlayerFloat:vecSrc[3], Float:vecVelocity[3], Float:timeusEvent) {
    
func_PlaySound(pPlayerg_szSmokeSounds[random(g_iMaxSndSmoke)]);
}

func_PlaySound(pPlayerszSound[]) {
    new 
iPlayers[32], iNum;
    
get_players(iPlayersiNum"ceh", (TeamName:get_member(pPlayerm_iTeam) == TEAM_CT) ? "CT" "TERRORIST");

    for(new 
iiNumi++) {
        
rh_emit_sound2(pPlayeriPlayers[i], CHAN_AUTOszSound, .vol 0.5, .attn 0.6);
    }



Bugsy 05-17-2020 12:15

Re: to remove Fire in the hole
 
If you want help with your code, include what exactly doesn't work so people can help you better. Also, wrap your code in php tags.

Try this:
http://forums.alliedmods.net/showthread.php?p=466271

jonny1990 05-17-2020 17:12

Re: to remove Fire in the hole
 
Quote:

Originally Posted by Bugsy (Post 2700714)
If you want help with your code, include what exactly doesn't work so people can help you better. Also, wrap your code in php tags.

Try this:
http://forums.alliedmods.net/showthread.php?p=466271

great, but you can help with this please

https://forums.alliedmods.net/showthread.php?t=324433


All times are GMT -4. The time now is 16:49.

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