Raised This Month: $ Target: $400
 0% 

AWP with 1 bullet


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
MihailoZ
Member
Join Date: Aug 2013
Old 03-25-2021 , 15:17   Re: AWP with 1 bullet
Reply With Quote #6

I'll get back to this issue soon.

I have this code:

Code:
actionAWP(id, OverrideTimer)
{
	new Float:fTime = halflife_time();
	
	if (fTime >= gfAWPNextUse[id] || OverrideTimer && cs_get_user_team(id) == CS_TEAM_T)
	{
		
		cs_set_weapon_ammo(give_item(id, "weapon_awp"), 1);
		cs_set_user_bpammo(id, CSW_AWP, 0);
		
		gfAWPNextUse[id] = fTime + get_cvar_float("awpcooldown");
	}
	else
	{
		set_hudmessage(gHudRed, gHudGreen, gHudBlue, gfTextX, gfTextY, gHudEffects, gfHudFxTime, gfHudHoldTime, gfHudFadeInTime, gfHudFadeOutTime, gHudChannel);
		show_hudmessage(id, "AWP next use: %.1f", gfAWPNextUse[id] - fTime);
		
	}
	
}
I have an issue with teams. Even though I set cs_get_user_team(id) == CS_TEAM_T, CT can still pick a weapon. Is this because of ELSE?
__________________
mhvtnns
MihailoZ is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:48.


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