quick help, probably easy
#1

hello!

i have a new years countdown:

Код:
#define FILTERSCRIPT

#include <a_samp>
#include <a_players>
new counter;
new countTimer;

forward timer();

#if defined FILTERSCRIPT


public OnFilterScriptInit()
{
  counter = 0;
	return 1;
}

public OnFilterScriptExit()
{
  counter = 0;
	return 1;
}
#else

main()
{
	print("\n------------------------------------------");
	print(" NewYearCountdown Script");
	print("------------------------------------------\n");
}

#endif


public OnPlayerConnect(playerid)
{
	SendClientMessage(playerid, 0xFF00FF,"Welcome to the New Year's Party!");
	return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp(cmdtext, "/count", true) || !strcmp(cmdtext, "/countdown", true))
{
	if(counter != 0)
		return SendClientMessage(playerid, 0xFFFF00FF, "The new-year countdown is already running...print what till next year!");
	counter = 60;
	countTimer = SetTimer("timer", 1000, true);
	return true;
}
	return 0;
}

public timer()
{
	if(counter > 0)
	{
		new string[3];
		format(string, sizeof(string), "%d", counter);
		GameTextForAll(string, 500, 3);
	}
	else
	{
		GameTextForAll("HAPPY NEW YEAR 2010!!!", 50000, 5);
		PlayerPlaySound(playerid, 1076, 0.0, 0.0, 0.0);
		
		counter = 0;
		KillTimer(countTimer);
	}
	counter--;
	return true;
}
awhen the countdown reaches zero, i want it to play the sound as in the script, but it wont, when i compile, i get an error saying (undefined symbol "plqayerid")

why, please help!!
Reply


Messages In This Thread
quick help, probably easy - by wilcock33 - 17.12.2009, 11:54
Re: quick help, probably easy - by matute - 17.12.2009, 12:01
Re: quick help, probably easy - by wilcock33 - 17.12.2009, 12:03
Re: quick help, probably easy - by Faraday - 17.12.2009, 12:05
Re: quick help, probably easy - by wilcock33 - 17.12.2009, 12:11
Re: quick help, probably easy - by Faraday - 17.12.2009, 12:13
Re: quick help, probably easy - by wilcock33 - 17.12.2009, 12:14

Forum Jump:


Users browsing this thread: 1 Guest(s)