Why this timer aint wrking
#1

hai,
I would like if some help me.

I have defined all nicely, no errors, no warnings, but not working. It's supposed to make Nlimit array goes more when nitr is off, and goes down when Nitro is on. I have defined that OnPlayerKeyStateChange. Nitro is supposed to stop when LMB is released, and it do. But, this timer is looking like being ignored. Here's code

Код:
forward NitroLimiter(playerid);
public NitroLimiter(playerid)
{
	new string[56],component;
    component = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_NITRO);
	for (new i = 0; i < MAX_PLAYERS; i++)
	    {
	        if(IsPlayerConnected(i))
	        {
	            if (IsPlayerInAnyVehicle(i) && (component == 1008 || component == 1009 || component == 1010))
				{
					if (Nlimit[i] > 20) Nlimit[i] = 20;
	        		if (Usingnitro[i] == 0) Nlimit[i]++,SendClientMessage(playerid,-1,"Nlimit goes more");
	        		else Nlimit[i]--;
	        		format(string,sizeof(string),"Nlimit is: %d",Nlimit[i]);
					SendClientMessage(i ,-1,string);
				}
	        }
		}
}
I have done this by myself, have not copied from someone or stolen. This is my own work, so I know whta I did, and where errors should be where should not. Timer is defined as: NitroLimit = SetTimer("Nitrolimiter",1000,1);

Every array and vars is defined as it should be.
Reply


Messages In This Thread
Why this timer aint wrking - by aco_SRBIJA - 02.03.2012, 06:53
Re: Why this timer aint wrking - by Twisted_Insane - 02.03.2012, 07:01
Re: Why this timer aint wrking - by aco_SRBIJA - 02.03.2012, 07:14
Re: Why this timer aint wrking - by aco_SRBIJA - 02.03.2012, 09:58
Re: Why this timer aint wrking - by Gamer_Z - 02.03.2012, 12:58
Re: Why this timer aint wrking - by 2KY - 02.03.2012, 14:27
Re: Why this timer aint wrking - by aco_SRBIJA - 02.03.2012, 16:47
Re: Why this timer aint wrking - by aco_SRBIJA - 02.03.2012, 16:53
Re: Why this timer aint wrking - by aco_SRBIJA - 02.03.2012, 19:08
Re: Why this timer aint wrking - by DRIFT_HUNTER - 02.03.2012, 19:35

Forum Jump:


Users browsing this thread: 1 Guest(s)