My weapon blocks work for the first round but the next round if you didnt die you cant get it again, how do i fix this,
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);
}
}
|