AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Awp block every round help (https://forums.alliedmods.net/showthread.php?t=95753)

Maloonka 06-26-2009 19:27

Awp block every round help
 
my hns awp block only works half a round if anyone knows how to fix this pm me so i can send my script and tell me what my problem is

anakin_cstrike 06-26-2009 19:30

Re: Awp block every round help
 
Why don't you post the code here so anyone who might know to solve the problem to help you?

Maloonka 06-26-2009 19:31

Re: Awp block every round help
 
can you help me?

Jaden 06-26-2009 19:49

Re: Awp block every round help
 
I can.

Maloonka 06-26-2009 19:59

Re: Awp block every round help
 
no you cant, can anyone help?

Maloonka 06-26-2009 20:01

Re: Awp block every round help
 
actionAwp(id)
{
if (is_user_alive(id) && !AwpUsed[id] && get_user_team(id) == 1)
{
give_item(id, "weapon_awp");
cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_awp", id), 1);
AwpUsed[id]++;
new name[33];
get_user_name(id, name, 32);
set_hudmessage(255, 255, 255, -1.0, -1.0, 0, 6.0, 4.0);
show_hudmessage(0, "Watch out! %s has an awp with 1 bullet!", name);
}
}
whats my problem here, how do i make so i can use this block once every round?

biscuit628 06-26-2009 20:14

Re: Awp block every round help
 
post the full code

cikjam 06-26-2009 21:35

Re: Awp block every round help
 
This one has a cooldown, so dunno.
Code:

actionAwp(id, OverrideTimer)
{
    //get game time
    new Float:fTime = halflife_time();
   
    //make sure player is alive
    if (fTime >= gfAwpNextUse[id] || OverrideTimer)
    {
        if ( get_user_team ( id ) == 1 )
        {
        cs_set_weapon_ammo(give_item(id, "weapon_awp"), 1);
        }
   
        //set the time when the player can use the awp again
        gfAwpNextUse[id] = fTime + get_cvar_float("bm_awpcooldown");
       
        //setup hud message to show information
        set_hudmessage(255, 255, 0, -1.0, 0.35, 0, 6.0, 10.0, 1.0, 1.0);
       
        //Show Message
        new szPlayerName[32];
        get_user_name(id, szPlayerName, 32);
           
        if ( get_user_team ( id ) == 1 )
        {
            show_hudmessage(0, "BEWARE! %s has an AWP with one bullet", szPlayerName);
        }
    }
    else
    {
        set_hudmessage(gHudRed, gHudGreen, gHudBlue, gfTextX, gfTextY, gHudEffects, gfHudFxTime, gfHudHoldTime, gfHudFadeInTime, gfHudFadeOutTime, gHudChannel);
        show_hudmessage(id, "Wait Time: One Round", gfAwpNextUse[id] - fTime);
    }
}


malec321 06-27-2009 05:07

Re: Awp block every round help
 
Code:

register_cvar("bm_frostcooldown", "999999999.0");        //someone might have been invincible when it was used
    register_cvar("bm_flashcooldown", "999999999.0");        //someone might have been invincible when it was used
    register_cvar("bm_moneycooldown", "999999999.0");        //someone might have been invincible when it was used
    register_cvar("bm_deaglecooldown", "999999999.0");        //someone might have been invincible when it was used
    register_cvar("bm_awpcooldown", "999999999.0"); 
    register_cvar("bm_gravitytime", "20.0");        //how long the player has boots of speed
    register_cvar("bm_gravitycooldown", "60.0");    //time before boots of speed can be used again
    register_cvar("bm_blindtime", "10.0");        //how long the player has boots of speed

You got to set the awpcooldown to 99999999.0

Use my awp code =)

Code:

actionAwp(id, OverrideTimer)
{
    //get game time
    new Float:fTime = halflife_time();

    //make sure player is alive
    if (fTime >= gfAwpNextUse[id] || OverrideTimer)
    {
        if ( get_user_team ( id ) == 1 )
        {
        cs_set_weapon_ammo(give_item(id, "weapon_awp"), 1);
        }

        //set the time when the player can use the nuke again (someone might have been invincible)
        gfAwpNextUse[id] = fTime + get_cvar_float("bm_awpcooldown");

        //setup hud message to show who nuked what team
        set_hudmessage(255, 255, 0, -1.0, 0.35, 0, 6.0, 10.0, 1.0, 1.0);

        //Show Message
        new szPlayerName[32];
        get_user_name(id, szPlayerName, 32);

        if ( get_user_team ( id ) == 1 )
        {
            show_hudmessage(0, "BEWARE! %s has an AWP with one bullet", szPlayerName);
        }
    }
    else
    {
        set_hudmessage(gHudRed, gHudGreen, gHudBlue, gfTextX, gfTextY, gHudEffects, gfHudFxTime, gfHudHoldTime, gfHudFadeInTime, gfHudFadeOutTime, gHudChannel);
        show_hudmessage(id, "Wait Time: One Round", gfAwpNextUse[id] - fTime);
    }
}

This one sets it so you get a message telling you to wait one round for the next use for AWP


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

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