Paraşüt açınca redbull gidiyor

Konu

#1
Redbull kullanırken hem paraşüt açtığımda hem de hook attığımda etkisi gidiyor. Yardım edebilecek varsa çok mutlu olurum.
.sma Redbull.sma (Dosya Boyutu: 5,15 KB | İndirme Sayısı: 1)
#2
Bu konu işine yarayacaktır
https://www.webailesi.com/konu-csduragi-redbull-yavaslama-sorunu-cozumu-31807
CS 1.6 Eklenti , Mod Kurulum , Sprey Yapımı için Discord : emircw 
#3
Deneyin;
PHP Kod:
#include <amxmodx>
#include <hamsandwich>
#include <reapi>

new const tag[] = "JailTown";

new const 
WeaponUid 1000;
new const 
WeaponEnt[] = "weapon_smokegrenade";
new const 
RedbullSound[] = "redbul_iciyor.wav";

new const 
models[][] = {
    "models/v_redbull.mdl",
    "models/p_redbull.mdl"
};

new 
bool:g_HasRedbull[MAX_CLIENTS+1],bool:g_RedbullDrink[MAX_CLIENTS+1],Float:g_cvars[3];

public 
plugin_init() 
{
    register_plugin("Redbull""0.1""LyNcH");

    register_clcmd("say /redbull","Drink_RedBull");
    register_clcmd("radio1","Drink_RedBull");

    RegisterHookChain(RG_CBasePlayerWeapon_DefaultDeploy"CBasePlayerWeapon_DefaultDeploy_Pre", .post false);
    RegisterHookChain(RG_CBasePlayer_ResetMaxSpeed,"CBasePlayer_ResetMaxSpeed",.post false);
    RegisterHookChain(RG_CSGameRules_RestartRound"CSGameRules_RestartRound", .post false);
    RegisterHookChain(RG_CBasePlayer_Killed"CBasePlayer_Killed", .post true);
    RegisterHookChain(RG_CSGameRules_PlayerSpawn"CSGameRules_PlayerSpawn", .post true);
    RegisterHam(Ham_Weapon_PrimaryAttackWeaponEnt"Redbull_PrimaryAttack");

    bind_pcvar_float(create_cvar("Redbull_Hiz","600.0"), g_cvars[0]);
    bind_pcvar_float(create_cvar("Redbull_Gravity","0.5"), g_cvars[1]);
    bind_pcvar_float(create_cvar("Redbull_MaxCan","200.0"), g_cvars[2]);
}

public 
plugin_precache()
{
    for(new 0sizeof(models); i++)
    {
        precache_model(models[i]);
    }
    precache_sound(RedbullSound);
}

public 
client_disconnected(id)
{
    g_HasRedbull[id] = false;
    g_RedbullDrink[id] = false;
}

public 
Drink_RedBull(id)
{
    if(IsCanUse(id)) 
    {
        g_HasRedbull[id] = true;
        rg_give_custom_item(idWeaponEntGT_REPLACEWeaponUid);
        client_print_color(id,id"^1[^3%s^1] ^4Basariyla Redbull Satin Aldin ^1!",tag);
    }
}

public 
CBasePlayerWeapon_DefaultDeploy_Pre(const iWeaponszViewModel[], szWeaponModel[], iAnimszAnimExt[], skiplocal
{
    if(get_entvar(iWeaponvar_impulse) == WeaponUid
    {
        SetHookChainArg(2ATYPE_STRINGmodels[0]);
        SetHookChainArg(3ATYPE_STRINGmodels[1]);
    }
}

public 
CBasePlayer_ResetMaxSpeed(id)
{
    if(
g_RedbullDrink[id]) 
    {
        
set_entvar(idvar_maxspeedg_cvars[0]);
        
set_entvar(idvar_gravityg_cvars[1]);
        return 
HC_SUPERCEDE;
    }
    return 
HC_CONTINUE;
}

public 
CSGameRules_RestartRound()
{
    for(new 0<= MaxClientsi++)
    {
        if(is_user_connected(i) && g_RedbullDrink[i])
        {
            RedbullStop(1002);
        }
    }
}

public 
CBasePlayer_Killed(const thispevAttackeriGib)
{
    if(g_RedbullDrink[this]) 
    {
        RedbullStop(this 1002);
    }
    new iNumT;
    rg_initialize_player_counts(iNumT);
    if(iNumT <= 1
    {
        for(new 1<= MaxClientsi++) 
        {
            if(is_user_connected(i) && is_user_alive(i)) 
            {
                RedbullStop(1002);
            }
        }
    }
}

public 
CSGameRules_PlayerSpawn(id)
{
    g_HasRedbull[id] = false;
    g_RedbullDrink[id] = false;
}

public 
Redbull_PrimaryAttack(id)
{
    new pevOwner get_member(idm_pPlayer);

    if(!g_HasRedbull[pevOwner])
    {
        return HAM_IGNORED;
    }

    g_HasRedbull[pevOwner] = false;
    g_RedbullDrink[pevOwner] = true;
    redbulleffect(pevOwner);
    rg_remove_item(pevOwner"weapon_smokegrenade");
    emit_sound(pevOwnerCHAN_WEAPONRedbullSoundVOL_NORMATTN_NORM0PITCH_NORM);
    return HAM_SUPERCEDE;
}

public 
redbulleffect(id)
{
    set_task(1.0"RedbullGiveHp"id 1001, .flags "b");
    set_task(20.0"RedbullStop"id 1002);
    set_entvar(idvar_maxspeedg_cvars[0]);
    set_entvar(idvar_gravityg_cvars[1]);
}

public 
RedbullGiveHp(iTaskID)
{
    new id iTaskID 1001;
    if(is_user_connected(id) && get_entvar(idvar_health) < g_cvars[2] && g_RedbullDrink[id]) 
    {
        set_entvar(idvar_maxspeedg_cvars[0]);
        set_entvar(idvar_gravityg_cvars[1]);

        set_entvar(idvar_healthFloat:get_entvar(idvar_health) + 1.0);
    }
}

public 
RedbullStop(iTaskID)
{
    new id iTaskID 1002;
    if(is_user_connected(id)) 
    {
        g_RedbullDrink[id] = false;
        rg_reset_maxspeed(id);
        set_entvar(idvar_gravity1.0);
        remove_task(id 1002);
        remove_task(id 1001);
        client_print_color(id,id,"^1[^3%s^1] ^4Redbull etkisi bitti ^1!",tag);
        return PLUGIN_HANDLED;
    }
    return PLUGIN_HANDLED;
}

bool:IsCanUse(const id)
{
    new iNumT;
    rg_initialize_player_counts(iNumT);
    if(iNumT <= 1
    {
        client_print_color(id,id,"^1[^3%s^1] ^4Tek mahkum varken redbull kullanilamaz ^1!",tag);
        return false;
    }
    if(g_RedbullDrink[id])
    {
        client_print_color(id,id,"^1[^3%s^1] ^4Zaten redbull iciyorsun ^1!",tag);
        return false;
    }
    if(g_HasRedbull[id])
    {
        client_print_color(id,id,"^1[^3%s^1] ^4Zaten redbulla sahipsin, elindekini ic ^1!",tag);
        return false;
    }
    if(!is_user_alive(id)) 
    {
        client_print_color(id,id,"^1[^3%s^1] ^4Oluler redbull kullanamaz ^1!",tag);
        return false;
    }
    return true;

Forumdaki reapi paraşütü kullanıyorsanız, addons/amxmodx/configs/reparachute.ini dosyasına girip gravity save seçeneğini açık yapın.
Steam: Tıkla
#4
İstek konusu, @Lynchk adlı kullanıcı tarafından 5 saat içinde çözülmüştür.
İsteği çözdüğü için Lynchk Adlı kullanıcıya 1 rep puanı ve 1 yardım etme puanı otomatik olarak verilmiştir.
Lynchk Adlı kullanıcı sizin dışınızda toplam 963 kişiye yardım etmiştir.

Herhangi bir konuda hata olduğunu düşünüyorsanız destek sistemi üzerinden iletişim kurabilirsiniz.

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Benzer Konular

4
Yorum
1.053
Okunma
09-03-2025, 03:36
12
Yorum
1.838
Okunma
13-02-2025, 00:41
4
Yorum
1.781
Okunma
06-02-2025, 13:13
2
Yorum
3.043
Okunma
07-12-2024, 20:28
4
Yorum
3.464
Okunma
30-11-2024, 01:37
2
Yorum
3.317
Okunma
24-11-2024, 09:02
5
Yorum
3.715
Okunma
23-11-2024, 22:05
Kayıt Ol
Uygun fiyatlı ve yüksek performanslı teamspeak3