Whys my timer not working in my FilterScript?
#1

I cant figure out why my timers not working?
Help!

Код:
#pragma tabsize 0
#include <a_samp>
#include <core>
#include <float>

#include "../include/gl_common.inc"

#define FILTERSCRIPT
#if defined FILTERSCRIPT

// PRESSED(keys)
#define PRESSED(%0) \
	(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
	
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFFF



forward SendPlayerFormattedText(playerid, const str[], define);
forward Nos(playerid);
//------------------------------------------------------------------------------------------------------

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("Nos FilterScript");
print("--------------------------------------\n");
return 1;
}
//------------------------------------------------------------------------------------------------------

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if (PRESSED(KEY_FIRE))
	{
		new
			vehicleid = GetPlayerVehicleID(playerid);
		if (vehicleid)
		{
			SetTimer("Nos", 2000, 0);//Nos Added After 1 Sec
		}
	}
	return 1;
}

public Nos(playerid)
{
 	new vehicleid = GetPlayerVehicleID(playerid);
  	SendPlayerFormattedText(playerid,"Nos Added",0);
  	AddVehicleComponent(vehicleid, 1010);//Nos
	return 1;
}

public SendPlayerFormattedText(playerid, const str[], define)
{
	new tmpbuf[256];
	format(tmpbuf, sizeof(tmpbuf), str, define);
	SendClientMessage(playerid, 0xFF004040, tmpbuf);
}

public OnFilterScriptExit()
{
print("Nos FilterScript Unloaded");
return 0;
}

#endif
Reply


Messages In This Thread
Whys my timer not working in my FilterScript? - by FluffyPawZ - 16.09.2010, 03:22
Re: Whys my timer not working in my FilterScript? - by cessil - 16.09.2010, 04:20
Re: Whys my timer not working in my FilterScript? - by [HiC]TheKiller - 16.09.2010, 05:07

Forum Jump:


Users browsing this thread: 2 Guest(s)