Raised This Month: $ Target: $400
 0% 

if team is ct


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mazmaajinsh
Senior Member
Join Date: Apr 2005
Location: Latvia
Old 10-17-2007 , 13:38   if team is ct
Reply With Quote #1

What to add to this code, so it will check if user team is CT? and if it isnt it wont work.
Code:
public timer_task() {
	for(new i=1;i<=get_maxplayers();i++) {
		if(is_user_connected(i) && is_user_alive(i) && showtimer[i-1] && timer_started[i-1]) {
			new kreedztime = get_systime() - timer_time[i-1], imin
			if((kreedztime / 60.0) >= 1) {
				imin = floatround(kreedztime / 60.0,floatround_floor)
				kreedztime -= (floatround(kreedztime / 60.0,floatround_floor) * 60)
			}
			set_hudmessage(255, 255, 255, -1.0, 0.05, 0, 0.0, 1.1, 0.0, 0.0, 1);
			show_hudmessage(i, " %d min%s %d sec%s | %i CP ", imin,imin == 1 ? "" : "s",kreedztime,kreedztime == 1 ? "" : "s", checkpointnum[i-1]); 

		}
	}
}
__________________
Ahujena
mazmaajinsh is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-17-2007 , 13:49   Re: if team is ct
Reply With Quote #2

if(is_user_connected(i) && is_user_alive(i) && get_user_team(i) == 2 && showtimer[i-1] && timer_started[i-1]) {
ConnorMcLeod is offline
mazmaajinsh
Senior Member
Join Date: Apr 2005
Location: Latvia
Old 12-06-2007 , 20:36   Re: if team is ct
Reply With Quote #3

nope, i still can run the timer..
__________________
Ahujena
mazmaajinsh is offline
Vet
Veteran Member
Join Date: Jul 2006
Location: I|O wa
Old 12-07-2007 , 21:21   Re: if team is ct
Reply With Quote #4

If what connorr wrote doesn't work, then there must be something wrong with the showtimer[] or timer_started[] variable.

It'd be easier to T-shoot if you posted the whole code.
__________________
=====================================
- My Plugins -
=====================================
Vet is offline
Send a message via MSN to Vet
Reply



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 01:23.


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