AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Freezetime? (https://forums.alliedmods.net/showthread.php?t=325078)

Arje 06-07-2020 13:53

Freezetime?
 
is it possible to block the "primary attack" during freezetime so they can't shoot? but only during the time of freezetime!

OciXCrom 06-07-2020 14:02

Re: Freezetime?
 
That's already how it works.

Arje 06-07-2020 14:31

Re: Freezetime?
 
Quote:

Originally Posted by OciXCrom (Post 2704475)
That's already how it works.

The problem is that I am with a mode (paintballmod) in which it can be fired during freezetime, and I would like to avoid that in some way, it is only a small detail but if it can be done I would like to do it.

I was thinking of something like "mp_freezetime" blocking "in_attack" but I would not be understanding how to script it in_attack and block it

mahbodsr 06-07-2020 15:27

Re: Freezetime?
 
The primary attack is blocked by default in freezetime
so what's the problem?
u mean seconday attack?

Firippu 06-07-2020 16:05

Re: Freezetime?
 
It may be the case that his paintball plugin bypasses the normal attack procedure, such as using Think & command detection, thus freezetime wouldn't affect it. Whatever it might be, it would be useful to link directly to the plugin you're using, so others can pick it apart & help solve your issue.

Arje 06-07-2020 16:43

Re: Freezetime?
 
Quote:

Originally Posted by mahbodsr (Post 2704495)
The primary attack is blocked by default in freezetime
so what's the problem?
u mean seconday attack?

PHP Code:


register_event
("HLTV""ev_roundstart""a""1=0""2=0")

public 
ev_roundstart()
{
    for (new 
1<= g_pbcounta++)
        if (
g_pbstatus[a] != 0)
            
paint_reset(g_paintballs[a]+TASK_PB_RESET);
    if (
freezetime)
        
freezetime 0;
}

public 
paint_reset(ent)
{
    
remove_task(ent);
    
ent -= TASK_PB_RESET;
    new 
afindpb 1;
    while (
a++ <= g_pbcount && findpb)
        if (
g_paintballs[a] == ent)
            
findpb g_pbstatus[a] = 0;

    
set_pev(entpev_effectspev(entpev_effects) | EF_NODRAW);
    
engfunc(EngFunc_SetSizeentFloat:{0.00.00.0}, Float:{0.00.00.0});
    
set_pev(entpev_velocityFloat:{0.00.00.0});
    
engfunc(EngFunc_SetOriginentFloat:{-2000.0, -2000.0, -2000.0});
    if (
pev(entpev_renderfx) != kRenderFxNone)
        
set_rendering(ent);


Well, I think here's the problem, the problem is that I can shoot paintballs during the freezetime


All times are GMT -4. The time now is 17:15.

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