Raised This Month: $ Target: $400
 0% 

set_task executing when it should not.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
fcastro16
Member
Join Date: Mar 2009
Old 12-25-2014 , 00:12   set_task executing when it should not.
Reply With Quote #1

Hello guys,

I am having a problem with my code. The set_task is executing when it should not, randomly.
From my understanding, the code should execute every 10 minutes 4 times.

Code:
public client_putinserver(id)
{
       set_task(600.0, "creditSystem", id, _, _, "a", 4)
}

public creditSystem(id)
{
	static team
	team = fm_cs_get_user_team(id)
	
	if (team == FM_CS_TEAM_SPECTATOR || team == FM_CS_TEAM_UNASSIGNED)
		return PLUGIN_HANDLED;
	else
	{
		if (is_user_connected(id))
		{
			zp_colored_print(id, "^x04[GDL] ^x01Ganaste un^x03 CREDITO ^x01!")
			g_creditos[id]++
		}
	}
	
	return PLUGIN_HANDLED;
}
thanks and merry christmas
fcastro16 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 15:22.


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